Easy Web Site DesignHTML tutorial : HTML Lists |
|
Suggested reading |
Lists are a useful way of getting information across quickly and are used frequently on the Web. HTML allows you to create three types of lists: unordered, numbered or ordered, and definition. The first two are found more commonly than the last. As usual let's illustrate these by example, starting with an unordered list:
Here's the output:
The list is surrounded by <ul> </ul> tags, each item on the list is surrounded by <li> </li> tags. Note that each list item itself may contain HTML formatting. Now for a numbered list:
Here's the output:
This time <ol> </ol> tags surround the list. The style of numbering (1, 2, 3... i, ii, iii etc) may be specified using a Style Sheet. Definition lists are used to provide a list of terms along with their definitions. Here's an example:
And the output:
The definition list is surrounded by <dl> </dl> tags. Items to be defined (definition terms) are surrounded by <dt> </dt> tags. Definitions (definition descriptions) are surrounded by <dd> </dd> tags. Want to learn more? See W3C - Dave Raggett's Introduction to HTML NCSA - A Beginner's Guide to HTML USENET newsgroups: |
© web.twinisles.com Questions? Comments? Contact info@twinisles.com |