HTML a href Attribute

HTML a Tag Reference HTML <a> tag
The href attribute specifies the link’s destination:

<a href=”http://thekingmaker.me”>The Kingmaker</a>

The href attribute specifies the URL of the page the link goes to.

If the href attribute is not present, the <a> tag is not a hyperlink.

Syntax
<a href=”URL”>

URL The URL of the link.
Possible values:

An absolute URL – points to another web site (href=”http://thekingmaker.me/default.htm”)
A relative URL – points to a file within a web site (href=”default.htm”)
Link to an element with a specified id within the page (href=”#top”)
Other protocols (https://, ftp://, mailto:, file:, etc..)
A script (href=”javascript:alert(‘Hello’);”)

Link to an email address with a specified subject (will only work if you have mail installed):

<a href=”mailto:matt@thekingmaker.me?Subject=Hello%20again”>Send email!</a>

Tagged with:

Leave a Reply

Your email address will not be published.