Lists are everywhere. We post them on our refrigerators and take them to the grocery store. Lists are a very efficient way to organize information. Naturally, HTML has a few tags to help you make lists. HTML has not 1, not 2, but 3 different types of lists that you can add to your pages! They are the ordered, unordered, anddefinition lists.
Ordered lists are exactly what the name implies: lists that follow a numerical order. Ordered lists begin with the <OL> tag and end with a </OL> tag. When we want to put an item into this list, we need to put a <LI>, or list item tag before that item.
Here's an example of the ordered list syntax:
What do I need from the store today?<p>
<OL>
<LI>Bread
<LI>Cheese
<LI>Milk
<LI>Butter
</OL>
And heres how it looks to our viewers:
What do I need from the store today?
- Bread
- Cheese
- Milk
- Butter
The Tutorial Underground is:<p>
<UL>
<LI>Cool!
<LI>Free!
<LI>Informative!
</UL>
And here's how it would look to Joe Browser (our viewer!):
The Tutorial Underground is:
- Cool!
- Free!
- Informative!
<OL TYPE="I">
The <LI> tag also has an attribute: VALUE. With the VALUE attrbute, we can change the value of a list item! Take a guess, what result would the following code result in:
<OL TYPE="A">
<LI VALUE="2">Think hard now!
</OL>
If you guessed "B. Think hard now!" you're right? Why? Check out the combination of the TYPE and VALUE attributes!
Heres a little trick: we can start an ordered list with any number (or letter, if we use TYPE) with the START attribute. It looks like this:
<OL START="3">
<LI>This is item number 3! </OL>
And to our viewers at home, it looks like this:
- This is item number 3!
<DT>HTML <DD>Hypertext Markup Language
<DT>XML <DD>eXtensible Markup Language
</DL>
Our friend Joe Browser see's it like this:
- HTML
- Hypertext Markup Language
- XML
- eXtensible Markup Language
0 comments:
Post a Comment
Dear Visitors All The Tricks And Hacks Posted Here Are Only For Knowledge Purpose.Don't Use These for Illegal Operations.