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="http://www.web4college.com" 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="http://www.codingb.com" target="_top"> anchore text </a>
Try</>

<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" />
Try</>

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

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

<base> tag

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

<head>
<base href="http://www.web4college.com" target="_blank" >
</head>
Try</>


Was this article helpful?

 

Email:

Message: