html / xhtml, css, php, mysql, javascript, asp, seo, web management, semantics, accessibility and more.
Creating basic lists, all the information and code needed to correctly display lists of any type on your page.
In category xhtml / html.
Posted by Joseph Skidmore on 09.09.05.
Creating lists to show information are sometimes essential, there are many types of lists and many more ways in which you can edit them. Here are some of the types of lists you can create.
On the unordered list you can see instead of each list object being numbered they have a dot (bullet) at the beginning at each one. So how are these made?
<ol> <!-- Ordered List ---> <li>Object 1</li> <li>Object 2</li> <li>Object 3</li> <li>Object 4</li> <li>Object 5</li> </ol>
<ul> <!-- Unordered List ---> <li>Object 1</li> <li>Object 2</li> <li>Object 3</li> <li>Object 4</li> <li>Object 5</li> </ul>
Now lets use a bit of CSS to customize our list shall we? What if you don't want bullets at the beginning of each list? Say you want squares. To do this we are going to use internal CSS.
<ul id="squares"> <!-- Unordered List With Squares---> <li>Object 1</li> <li>Object 2</li> <li>Object 3</li> <li>Object 4</li> <li>Object 5</li> </ul>
And your CSS would be:
#squares li {
list-style-type: square;
}
These together would give you:
Other possible values for list-style-type are as follows:-
disc circle square decimal lower-roman upper-roman lower-alpha upper-alpha none
Why not try them out and see which one suits you best. Remember, there are much more you can do to customize these lists, check out my CSS section for more.
Page generated in 0.0011 seconds.