Thursday, February 18, 2010

HTML Tutorial : List and Hyperlink

Let's go learn again. Yesterday we have learn about html tags, html format and html table. This section we will know about html list and html hyperlink. What is the list and what is the hyperlink?


Lists the tags often used with HTML lists: <ol>, <ul>, and <li>.

<ol>
The <ol> tag specifies that the following list is ordered.
<ul>
The <ul> tag specifies that the following list is unordered.
<li>
The <li> tag lists each item, whether ordered or numbered. Note that each item is indented.
Example 1: ordered list.

HTML:
<ol>
<li>Unordered list 1.</li>
<li>Unordered list 2.</li>
</ol>

Display:

  1. Unordered list 1.
  2. Unordered list 2.

Example 2: unordered list.

HTML:
<ul>
<li>Unordered list 1.</li>
<li>Unordered list 2.</li>
</ul>

Display:

  • Unordered list 1.
  • Unordered list 2.

HYPERLINK
<a>
The essence of an HTML document lies in the first two words: (H)yper(T)ext. In other words, it is the ability to link to other documents that makes HTML unique. How do HTML documents link to other documents? It does so via the <a> tag. The attributes for the <a> tag are href and name. Below we show an example for each:
Example 1: Link to an external document.

HTML:
<a href="sample.html">This link</a> takes you to a document called "sample.html."

Display:
This link takes you to a document called "sample.html."


Example 2: Link to an anchor within the same document.

HTML:
<a href="#atag">This link</a> takes you to a pre-determined location on the same page.

Display:
This link takes you to a pre-determined location on the same page.

Note that you may also link to an anchor within an external document.

OK, Next we will learn about html image.

Regards,
Haerudin

1 comment: