The <a> tag (anchor tag) in HTML is used to create a hyperlink on the webpage. This hyperlink is used to link the webpage to other web pages. It’s either used to provide an absolute reference or a relative reference as its “href” value.
Syntax:
<a href = ‘ link ’> Link Name </a>
Anchor Attribute
download – It is used to specify the target link to download when the user clicks.
hreflang – It is used to specify the language of the linked document.
media – It is used to specify the linked media.
rel – It is used to specify the relation between the current document and the linked document.
type – It is used to specify the type of links.
target – It specifies the target link.
<a href=“ Link ” download > Content </a>
<a href=“ Link ” hreflang = “ en ”> Content </a>
<a href=“ Link ” media = “ print and ( resolution:300dpi ) ”> Content </a>
<a href=“ Link ” rel = “ nofollow ”> Content </a>
<a href=“ Link ” type = “ text/html ”> Content </a>
<a href=“ Link ” target = “ _blank ”> Content </a>
rel Attribute
Alternate – Provides a link to an alternate representation of the document (i.e. print page, translated or mirror).
Author – Provides a link to the author of the document
Bookmark – Permanent URL used for bookmarking
External – Indicates that the referenced document is not part of the same site as the current document
Help – Provides a link to a help document
License – Provides a link to licensing information for the document
Next – Provides a link to the next document in the series
Nofollow – Links to an unendorsed document, like a paid link. (“nofollow” is used by Google, to specify that the Google search spider should not follow that link).
Noopener – Requires that any browsing context created by following the hyperlink must not have an opener browsing context.
Noreffer – Makes the referrer unknown. No referer header will be included when the user clicks the hyperlink
Prev – The previous document in a selection
Search – Links to a search tool for the document
Tag – A tag (keyword) for the current document