HTML <a> tag
HTML <a> tag
The <a>
tag defines a hyperlink. This is usually a link to another document.
Example
HTML Online Editor
<!DOCTYPE html>
<html>
<body>
<a href="/css">Learn CSS.</a>
</body>
</html>
Attributes
The following are the attributes of <a> tag. Also try Global attributes.
Attribute | Value | Explanation |
---|---|---|
download | file_name | Download the target file. |
href | url | Contains the URL of the page the link goes to. |
hreflang | language_code | Defines the language used in the linked file. |
media | media_query | Defines what device/media the linked file optimized for. |
rel | alternate author bookmark external help license next nofollow noreferrer noopener prev search tag |
Defines the relationship between the current document and the linked document. |
target | _blank _parent _self _top |
Specifies where to open the linked document. |
type | media type | Defines the media type of the linked file. |
Deprecated Attributes
The following attributes should not be used in any case.
Attribute | Value | Explanation |
---|---|---|
charset |
| Specifies the character encoding of the linked URL. |
coords | p1, p2,..., pn | Specifies the coordinates of the link. Used when shape attribute is defined. |
name | section_name | Specifies a possible target location within a page. |
rev | text | Specifies the relationship between the linked document and the current document. |
shape |
| Specifies the shape of a link. |
Reminder
Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in HTML.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.