Home Advertise with us Forum Articles Sitemap Contact

HTML a Tag

HTML anchor is represented by the <a> tag that is used to establish a hyperlink to another document or to create a bookmark inside a document or for both. While the link to another document is created using the “href attribute”, the bookmark is created using the “name attribute”. The element is most often referred to as ‘link’ or ‘hyperlink’.

Bookmark Creation

When using the <a> tag to create a bookmark, it is necessary to define a unique name or id or both with the same value for comparison.

Example: <a id="bookid" name="bookname"> Here we are referring to the bookmark named “bookid” for compatibility. /a>

Hyperlink Creation

When using the HTML <a> tag to create a hyperlink to another web page, the href attribute is used, which specifies the location of the mentioned resource.

Code Results
<a href=" http://www.htmltag.org" > HTML Tag Tutorial</a>

The browsers render the links in a special way using text decorations such as underline or color.

An unvisited link is blue in color & underlined.


A visited link is purple in color & underlined.


An active link is red in color & underlined.


HTML Tip 1

Use only hexadecimal #RGB values for colors. The behavior of named colors is browser-idiosyncratic and totally unpredictable.

HTML Tip 2

You can resize your images without a graphics program by changing the HEIGHT and WIDTH in your image tag.