Jumat, 30 Oktober 2009

HTML Tutorial -Part 6-



HTML TUTORIAL



Part 6: Lists, Lists, Lists


The UNORDERED LIST...


The Unnumbered List is the first of the three types of lists. This is probably the most common list you will use.


Example of an Unordered List...


  • Operational Research

  • Accounting Research

  • Statistic

  • Math

  • Algorithm


Notice the Bullet Before each List Item. Now here is the HTML Code for the Unordered List Above...




<ul>
<li>Operational Research</li>
<li>Accounting Research</li>
<li>Statistic</li>
<li>Math</li>
<li>Algorithm</li>
</ul>



The <ul> tag is the opening Unordered List Tag. Therefore, the </ul> is the closing tag. Between these two tags you place LIST ITEMS, each one having an individual <li> opening tag, and an optional </li> closing tag. There is no limit to the number of List Items you may have in a single list.

The ORDERED LIST...


The Ordered List, also known as the Numbered List, is very similar in structure to the unordered list, except each list item has a number in front of it, instead of a bullet. Also, the opening tag for the list is <ol> instead of <ul>, and the closing tag is </ol> instead of </ul>. List Items within the list still use the same tags.


Example of an Ordered List...


  1. Operational Research

  2. Accounting Research

  3. Statistic

  4. Math

  5. Algorithm


Notice the Number Before each List Item. Now here is the HTML Code for the Ordered List Above...




<ol>
<li>Operational Research</li>
<li>Accounting Research</li>
<li>Statistic</li>
<li>Math</li>
<li>Algorithm</li>
</ol>




The Definition List...


This type of list is a little more complicated, but still very easy to use. This list starts with the <dl> opening tag, and ends with the </dl> closing tag. This has another tag known as <dt> for Definition Term, and <dd> for Definition Definition. These two tags do not need closing tags.


Example of a Definition List...


Kepulauan Riau
A province in north of Indonesia
Mosque
A place for moslem to pray or an islmacic holy place
Google
One of search engine


Now here is the HTML code for this Definition List...



<dl>
<dt>Kepulauan Riau
<dd>A province in north of Indonesia
<dt>Mosque
<dd>A place for moslem to pray or an islmacic holy place
<dt>Google
<dd>One of search engine
</dl>



Go To Part 7

1 komentar: