80 likes | 208 Views
Lists in XHTML. Two main types of lists. Ordered Lists sequences (e.g. the steps in a recipe ) or preferences carry numbers (Arabic or Latin) or letters Example: first step second step third step. Unordered Lists items that do not have a natural order (e.g. the ingredients in a recipe)
E N D
Two main types of lists Ordered Lists • sequences (e.g. the steps in a recipe) or preferences • carry numbers (Arabic or Latin) or letters Example: • first step • second step • third step Unordered Lists • items that do not have a natural order (e.g. the ingredients in a recipe) • carry bullet points, symbols or dashes Example: • first item • second item • third item
XHTML Markup Source Code: Result in thebrowser: first item second item third item <ol> <li>first item</li> <li>second item</li> <li>third item</li> </ol>
Advantages • numberingisdoneautomatically: Myfavouritebooks: • Alice in Wonderland • Peter Pan • Lord ofthe Rings Harry Potter
Advantages Source Code: <ol> <li>Alice in Wonderland</li> <li>Harry Potter</li> <li>Peter Pan</li> <li>Lord oftheRings</li> </ol>
The newlist: Myfavouritebooks: • Alice in Wonderland • Harry Potter • Peter Pan • Lord ofthe Rings
Nested Lists Writing a term paper: Source code: <ol> <li>Finding a topic</li> <li>Collectingliterature <ul> <li>fromthelibrary</li> <li>fromtheinternet</li> </ul> </li> <li>Writing thetext</li> </ol> • Finding a topic • Collecting literature • from the library • from the internet • Writing the text