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: 1.first step 2.second step 3.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: first item second item third item Result in the browser: 1.first item 2.second item 3.third item
Advantages numbering is done automatically: My favourite books: 1.Alice in Wonderland 2.Peter Pan 3.Lord of the Rings Harry Potter
Advantages Source Code: Alice in Wonderland Harry Potter Peter Pan Lord of the Rings
The new list: My favourite books: 1.Alice in Wonderland 2.Harry Potter 3.Peter Pan 4.Lord of the Rings
Nested Lists Writing a term paper: 1.Finding a topic 2.Collecting literature – from the library – from the internet 3.Writing the text Source code: Finding a topic Collecting literature from the library from the internet Writing the text