The href attribute in HTML Page

We use the <a> i.e. the anchor tag to create links in an HTML web page. The <a> tag is set inside the<body>…</body> tag. To set the URL of the page we want to link, an attribute is used, which is called href:

Above, we linked a page using the <a> tag and its attribute href.

Let us see an example to set links using the <a> tag and its attribute href:

Example

Output

href attribute HTML

In the above page, we have set the “details” text as a hyperlink using the <a> tag with href attribute.

How to create horizontal line in HTML Page
Image height and width attribute in HTML
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading