HTML href attribute

href attribute represents the location or URL of the linked resource.

<p>href attribute is used to make links</p>
<a href="" title="web4college"> Go to web4college </a>

href attribute is used to make links

Go to web4college

Attribute values

All possible values of accept attribute

The value of href attribute is the valid URL. title attribute defines the nature of the link.

Related Tags

The tags that support accept attribute

<a> tag

a tag defines a hyperlink of the other pages.

<a href="" target="_top"> anchore text </a>

<area> tag

area tag element makes a link on an area. It supports the href attribute.

<area alt="triangle" title="triangle" href="files/triangle.html" shape="poly" coords="13,122,50,61,86,123" />

link tag imports external resources such as CSS style sheet, script file or favicon icons.

<link href="files/test.css" rel="stylesheet" >

<base> tag

The base tag provides a default or alternate URL for every link in the page. base tag supports href attribute.

<base href="" target="_blank" >

Was this article helpful?