HTML < a > Tag - Learn About Website | DaddyFile

0

HTML <a> Tag


Example

A link to DaddyFile.com:

<a href="http://www.DaddyFile.com">Visit DaddyFile.com!</a>


Definition and Usage

The <a> tag defines a hyperlink, which is used to link from one page to another.
The most important attribute of the <a> element is the href attribute, which indicates the link's destination.
By default, links will appear as follows in all browsers:
  • An unvisited link is underlined and blue
  • A visited link is underlined and purple
  • An active link is underlined and red

Tips and Notes

Tip: The following attributes: download, hreflang, media, rel, target, and type cannot be present if the href attribute is not present.
Tip: A linked page is normally displayed in the current browser window, unless you specify another target.

Differences Between HTML 4.01 and HTML5

In HTML 4.01, the <a> tag could be either a hyperlink or an anchor. In HTML5, the <a> tag is always a hyperlink, but if it has no href attribute, it is only a placeholder for a hyperlink.
HTML5 has some new attributes, and some HTML 4.01 attributes are no longer supported.

Post a Comment

 
Top