Wednesday, September 12, 2012

Html lists

The most common list elements in HTML are ordered and unordered lists.The difference between these is that the ordered ones will appear in a numerical list, while the unordered ones will be inserted after a point.I made one example of each so you understand them better.

Ordered list:                    Unordered list:         

 <ol>                            <ul>
<li>German</li>            <li>German</li>
<li>Spanish</li>             <li>Spanish</li>
<li>English</li>              <li>English</li>
</ol>                             </ul>



Let`s look at the result:

Ordered
  1. German
  2. Spanish
  3. English
Unordered
  • German
  • Spanish
  • English  
So remember, to create an ordered/unordered list, the tags to create those are <ol> and <ul>.
For all the items in the list use <li>.


Besides the ordered/unordered lists you can also employ a definition list for your HTML webpage.These are composed of two elements, the term <dt> and the definition <dd>.


Definition list

<dl>
<dt>USA</dt>
<dd>United States of America</dd>
<dt>House</dt>
<dd>A building for human habitation</dd>
<dt>Bottle</dt>
<dd>A container, typically made of glass or plastic and with a narrow neck, used for storing liquids.</dd>
</dl>



And how it looks like in any internet explorer:
USA
United States of America
House
A building for human habitation
Bottle
A container, typically made of glass or plastic and with a narrow neck, used for storing liquids.

No comments:

Post a Comment