Appendix A. Answers to Exercises

  1. Mark up the following sentence with the relevant presentational elements.

    The 1st time the bold man wrote in italics, he underlined several key words.

    A. The sentence uses superscript, bold, italic, and underlined presentational elements.

    <p>The 1<sup>st</sup> time the <b>bold</b> man wrote in <i>italics</i>, he
    <u>underlined</u> several key words.</p>
  2. Mark up the following list, with inserted and deleted content:

    Ricotta pancake ingredients:

    • 1 1/23/4 cups ricotta

    • 3/4 cup milk

    • 4 eggs

    • 1 cup plain white flour

    • 1 teaspoon baking powder

    • 75g50g butter

    • pinch of salt

    A. Here is the bulleted list with the editing elements added:

    <h1>Ricotta pancake ingredients:</h1>
    <ul>
      <li>1 <del>1/2</del><ins>3/4</ins> cups ricotta</li>
      <li>3/4 cup milk</li>
      <li>4 eggs</li>
    <li>1 cup plain <ins>white</ins> flour</li>
      <li>1 teaspoon baking powder</li>
      <li><del>75g</del><ins>50g</ins> butter</li>
      <li>pinch of salt</li>
    </ul>
  1. Look back at the Try It Out example where you created a menu, and create a new page that has links, like those at the top of the menu page, to each of the courses in the menu example. Then add a link to the main Wrox Press Web site (www.wrox.com).

    A. Your code should look something like this:

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <title>Links to menu</title> </head> <body> <h1>Links ...

Get Beginning Web Programming with HTML, XHTML, and CSS, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.