Ok you are dead bored with printing stuff in the conventional way . Well lets move onto something
more exciting then. Printing text in
L
I
S
T
form - well nearly more exciting.
It is some times useful to produce ordered numbered lists. An ordered numbered list always begins
with the <ol> tag element, and is then followed by list element
<li>. For example if I wanted to list the first five levels of quake II
then the following code would be sufficient
<ol>
<li> Entry
<li> Warehouse
<li> Jail
<li> Mines
<li> Factory
</ol>
This will list the above five quake II levels as below.
- Entry
- Warehouse
- Jail
- Mines
- Factory
Ok you do not like ordered numbers, and you want roman numerals or letters instead. Easy you just add the
type attribute to the <ol> tag. You can also
include the start attribute which will start the list at some preferred value
of your choice.
<ol type="a" start="4" >
<li> Entry
<li> Warehouse
<li> Jail
<li> Mines
<li> Factory
</ol>
The above will give you list starting with the letter d.
- Entry
- Warehouse
- Jail
- Mines
- Factory
You can use the following parameters for the type attribute. If no
type attribute is used, then the default will be numbers.
(TYPE=A) will give capital letters. e.g. A, B, C ............
(TYPE=a) will give small letters. e.g. a, b, c .................
(TYPE=I) will give large roman numerals. e.g. I, II, III .
(TYPE=i) will small roman numerals. e.g. i, ii, iii ........
An alternative way to list text, is to use the unordered <ul> tag element
followed by the <li> element which will give you a bullet list.
<ul>
<li> Gunner
<li> Enforcer
<li> Berserker
<li> Gladiator
</ul>
ie.
- Gunner
- Enforcer
- Berserker
- Gladiator
It is also possible to produce definition lists, using <DL> element.
The <dt> element is used to indicate the term, while <dd>
element defines the term.
<dL>
<dt> <font color="#0000ff">Gunner </font>
<dd> These guys are extremely thick. Easy to kill and not well armed.
<dt> <font color="#0000ff">Berserker </font>
<dd> Get your big guns out for these guys. They take some serious pounding.
</dL>
You will notice that in the above code that I have also made the terms appear in a blue font.
- Gunner
- These guys are extremely thick. Easy to kill and not well armed.
- Berserker
- Get your big guns out for these guys. They take some serious pounding.
|