Sams Teach Yourself HTML 4 in 24 Hours

Sams Teach Yourself HTML 4 in 24 Hours

By Dick Oliver

Workshop

Quiz

  1. How would you center everything on an entire page?
  2. Write HTML to create the following ordered list:

    X. Xylophone

    Y. Yak

    Z. Zebra

  3. How would you indent a single word and put a square bullet in front of it?
  4. Use a definition list to show that the word "glunch" means "a look of disdain, anger, or displeasure" and that the word "glumpy" means "sullen, morose, or sulky."
  5. Write the HTML to create the following indentation effect:
    • Apple pie,
      • pudding,
        • and pancake,
      • All begin with an A.

Answers

  1. Put <div align="center"> immediately after the <body> tag at the top of the page, and </div> just before the </body> tag at the end of the page.
  2. <ol type="a" start="24"><li>xylophone</li><li>yak</li><li>zebra</li></ol>

    The following alternative will also do the same thing:

    <ol type="a"><li value="24">xylophone</li><li>yak</li><li>zebra</li></ol>
    
  3. <ul type="square"><li>supercalifragilisticexpealidocious</li></ul>

    (Putting the type="square" in the <li> tag would give the same result because there's only one item in this list.)

  4. <dl>
    <dt>glunch</dt><dd>a look of disdain, anger, or displeasure</dd>
    <dt>glumpy</dt><dd>sullen, morose, or sulky</dd>
    </dl>
    								
  5. <dl><dt>apple pie,</dt>
      <dd>pudding,</dd>
      <dl><dd>and pancake</dd></dl>
      all begin with an a.</dl>
    								
    Note that blank lines will appear above and below and pancake in Microsoft Internet Explorer 3, but not in later versions or in any Netscape browser.

Exercise

  • Try producing an ordered list outlining the information you'd like to put on your Web pages. This will give you practice formatting HTML lists and also give you a head start on thinking about the issues covered in Part VI, "Building a Web Site."

Share ThisShare This

Informit Network