href Attribute
href attribute defines the URL of a page the link is connected. This attribute can be used with <a>, <area>, <base>, <link> etc tag.
Example:
<!DOCTYPE html>
<html>
<head>
<title>
Page Title
</title>
</head>
<body>
<p>
This is the href attribute example:
</p>
<a href="www.google.com">
This is a link
</a>
</body>
</html>
Run Example
Browser Support
| Attribute |
Firefox |
Chrome |
IE |
Opera |
Safari |
| href |
Yes |
Yes |
Yes |
Yes |
Yes |