The a Tag
The a Tag
Links are likewise a necessary piece of each and every site page. You can add links to text or pictures that will empower the client to tap on them to be coordinated with another document or website page. In HTML, links are defined using the a tag. Content/data is placed between the starting and closing tags.
Syntax:-
Its syntax is:- < a >
Explanation:-
Attribute | Value | Description |
---|---|---|
download | filename | Specifies that target will be downloaded when user clicks on hyperlink |
href | URL | Specifies URL of page link goes to |
hreflang | language_code | Specifies language of linked document |
media | media_query | Specifies what media/device linked document is optimized for |
ping | list_of_URLs | Specifies a space-separated list of URLs to which, when link is followed, post requests with body ping will be sent by browser (in the background). Typically used for tracking. |
referrerpolicy | no-referrer no-referrer-when-downgrade origin origin-when-cross-origin same-origin strict-origin-when-cross-origin unsafe-url |
Specifies which referrer information to send with link |
rel | alternate author bookmark external help license next nofollow noreferrer noopener prev search tag |
Specifies relationship between current document and linked document |
target | _blank _parent _self _top |
Specifies where to open linked document |
type | media_type | Specifies media type of linked document |