| |
|
All chapters... Table of contentsIntroduction A simple HTML document Images Lists Links Tables Frames Forms Cascading style sheets JavaScript Programming in PHP Server side includes CGI & Perl Extended characters Examples of colours Learn more Software Recent changes Alphabetical index In this chapter...
Unordered listOrdered list Definition lists Nested lists
Taalkeuze...
U hebt gekozen om Engels als eerste taal te gebruiken. |
ListsList are a practical and simple method for ordering information. Unordered listThe UL element, an unordered list, shows items with just a plain bullet before them. Every item in the list starts with the LI (list item) element. You can close each list item with an </LI> tag but this is not obligatory: <UL>
Both the UL and LI element can take the attribute TYPE. This can take the values of "disc", "circle" or "square". If you include this attribute in the UL element, it will affect the whole list. If you include it in an LI element, the attribute will affect that item only: <UL>
As you can see from these two examples, the default for TYPE is "disc". The TYPE attribute has been deprecated, in favour of style sheets. Ordered listIn the ordered list each item gets a number, automatically. The items are also indented. Each item should start with the LI element. Ordered lists look like this: <OL>
The result is almost the same as an unordered list, except that in the unordered list the items do not get a number but a bullet before them. Both the OL and the LI element can be assigned different styles. If you put the TYPE attribute in the <OL> tag is influences the whole list, it you put it in the <LI> tag, it affects that item only. <OL STYLE="list-style-type:hebrew">
You will probably see that your browser does not recognise all the different ways of numbers. Normally, the ones not recognised will be replaces by normal, decimal numbering. Definition listsA definition list (also referred to as glossary list) has elements that consist of two parts: a term and its definition. For example: <DL>
DD and DT elements may end with a </DD> and </DT> tag respectively but this is optional. Also, you can have more than one term followed by more than one definition: <DL>
Nested listsIt is possible to put lists within lists: <OL>
With nested lists you can use all the options and attributes mentioned in this chapter.
|
|
Feedback welcome...
Open standards...
This site conforms completely to open standards of the World Wide Web Consortium (W3C). Click on the logos to verify that.
| |
|
©1995-2010 Jan Weijers, the Netherlands. All rights reserved.
| |