HTML Anchor Tag
HTML anchor tags <a>
are employed to make hyperlinks on web pages. It allows you to link to
other websites, resources, or specific sections of the same website.
Syntax:
<a
href="your path">
link name
</a>
Attributes
Attributes | Description |
---|---|
download |
Declares that upon a user clicking on the link, the target is downloaded. |
href |
Defines the URL of the page that the link is pointing to. |
rel |
Defines the relationship between the current and associated document. |
target |
Instructs where to open the document linked |
Target Attribute Values
- _blank: Opens the document linked here in a new tab or window.
- _top: Opens document in the entire body of the window.
- _self: Opens document in the same window or tab.
- _parent: Opens the associated document in the parent frame.
Browser links typically comply with the following conventions:
- Active links: Underlined and red.
- Visited links: Underlined and purple.
- Unvisited links: Underlined and blue.
Example:
<a href=""> Visit my website </a>