HTML href Attribute
HTML href Attribute
The href attribute specifies different properties for different tags.
In a and area tags, it is used to specify the URL of the page the link goes to.
In link, it is used to specify the location of the external resource.
In base, it is used to specify the base URL for all relative URLs on a page.
Used With:-
Elements | Attribute |
---|---|
a | href |
area | href |
base | href |
link | href |
Syntax:-
Its syntax is:- < element href="URL" >