The href attribute specifies the link's destination:
The href
attribute specifies the URL of the page the link goes to.
If the href
attribute is not present, the <a>
tag will not be a hyperlink.
Tip: You can use href="#top"
or href="#"
to link to the top of the current page!
<a href="URL">
Value | Description |
---|---|
URL | The URL of the link.
Possible values:
|
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<h1>The a href attribute</h1>
<p>An absolute URL: <a href="https://horje.com/">Horje</a></p>
<p>A relative URL: <a href="tag_a.asp">The a tag</a></p>
</body>
</html>
Type: | Html |
Category: | Web Tutorial |
Sub Category: | HTML Tag |
Uploaded by: | Admin |