Quick Links
One of the things computers are good at is performing actions repetitively. Here we will consider making lists, of which there are two types. In one,the items are automatically numbered, while in the other, each list item is marked with a bullet.
The following source code and example output will be discussed.
| Source Code | Rendering by Browser |
|---|---|
<H1 align=center>DFStermole</H1> <H3>Personal Info</H3> <OL> <LI>DOB: Sometime in the last millennium</LI> <LI>Sex: M</LI> <LI>Grades: Teaches 10 and 12</LI> </OL> <H3>Interests</H3> <UL> <LI>Baseball</LI> <LI>Computers</LI> <LI>Bowling</LI> </UL> <HR> ©2005 DFStermole<BR> Created: 2 March 2005 |
DFStermolePersonal Info
Interests
©2005 DFStermole Created: 2 March 2005 |
`O'rdered `L'ists (<OL>...</OL>) introduce each `L'ist `I'tem (<LI>...</LI>) with an ordinal value. In the sample, the items consist of personal information. You can also specify the kind of ordering you would like with the "type" attribute. It has the following possible values: "1" for numbers; "A" for uppercase letters; "a" for lowercase letters; "I" for uppercase Roman numerals; "i" for lowercase Roman numerals. Browsers use "1" as the default.
`U'nordered `L'ists (<UL>...</UL>) are unordered in the sense that there is no intended priority or hierarchy of importance. The list items in this list are my interests. You can also specify the shape used to introduce the item with the "type" attribute. It has the following possible values: "disc", "circle", and "square". Most browsers use "disc", AKA bullet, as the default.