HTML Codes Tutorial by Example


Introduction
HTML tags
Basic HTML tags
HTML format
HTML table
HTML list
HTML link
HTML image
HTML frame
Special chars
Tags and SEO
HTML commands
HTML Color
Site Map










Data Warehousing & Business Intelligence








HTML Link

<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 to a you to a pre-determined location on the same page.

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

Next Section

Site Map   |   Links

1