topical media & game development

talk show tell print

basic-xml-16-ch12-eg01.htm / htm

  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  <html xmlns="" lang="en">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Lists in XHTML</title>
    <h1><a id="lists" />Lists in XHTML</h1>
    <p>Three types of list are available to us when writing an XHTML document. These are:</p>
      <li><a href="#orderedList">Ordered List</a></li>
      <li><a href="#unorderedList">Unordered List</a></li>
      <li><a href="#definitionList">Definition Lists</a></li>
    <h2><a id="orderedList" />Ordered List</h2>
    <p>An ordered list allows you to create a list of items, each of which is preceeded by a number. The list is automatically numbered in ascending order.</p>
    <p>The list is started with a <code>nl</code> tag, which indicates the start of a numbered list. The <code>nl</code> element is the containing element, for the numbered list. Each list item is then placed inside a <code>li</code> element. </p>
    <h2><a id="unorderedList" />Unordered List</h2>
    <p>An unordered list is a fancy name for a list of bullet points that are not preceeded by numbers. The containing element for the items in an unordered list is the <code>ul</code> element. Again each item in the list is put inside the <code>li</code> element.</p>
    <h2><a id="definitionList" />Definition List</h2>
    <p>The least common type of list is a definition list, which tends to comprise of words and their definitions.</p>
    <p>The containing element for a definition list is <code>dl</code> element.Each term that has to be defined is contained inside a &lt;DT&gt; element, while the definition is contained in a &lt;DL&gt; element, like so.</p>
    <div><a href="#lists">Back to top</a></div>

(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.