PROGRAMMING EXERCISE 7
14.5 (Text Shadow) Create a shadow on the phrase “HTML5 Canvas” with an offset-x of 2px, an
offset-y of 5px, a blur of 6px and a text-shadow color gray.
14.6 (Rounded Rectangle) Generalize the example in Fig. 14.7 into a roundedRect function and
call it twice with different arguments to place two different rounded rectangles on the canvas
15.7 (Nutrition Information XML Document)Create anXML document that marks up the nutrition
facts for a package of Grandma White’s cookies. A package of cookies has a serving size of 1
package and the following nutritional value per serving: 260 calories, 100 fat calories, 11 grams of
fat, 2 grams of saturated fat, 5 milligrams of cholesterol, 210 milligrams of sodium, 36 grams of total
carbohydrates, 2 grams of fiber, 15 grams of sugars and 5 grams of protein. Name this document
nutrition.xml. Load the XML document into your web browser. [Hint: Your markup should contain
elements describing the product name, serving size/amount, calories, sodium, cholesterol, proteins,
etc. Mark up each nutrition fact/ingredient listed above.
15.9 (Nutrition Information XSL Style Sheet) Write an XSL style sheet for your solution to
Exercise 15.7 that displays the nutritional facts in an HTML5 table.