HTML Links
In this tutorial, you will learn how to link one web page to another in HTML.
Creating Links in HTML
A link or hyperlink is a connection from one web resource to another. Links allow users to move seamlessly from one page to another.
A link has two ends, called anchors. The link starts at the source anchor and points to the destination anchor, which may be any web resource, for example, an image, an audio or video clip, a PDF file, an HTML document or an element within the document itself.
HTML Link Syntax
Links are specified in HTML using the <a> tag ie anchor tag. It is paired and inline tag.
A link or hyperlink could be a word, group of words, or image.
<a href="url">Link text</a>
Anything between the opening <a> tag and the closing </a> tag becomes the part of the link that the user sees and clicks in a browser.
The most important attribute of the <a> tag is the href attribute, which indicates the link's destination. It's value can be absolute or relative URL.
Absolute URL means, complete address of web page/resource. You can use relative URL when both source and destination web page/resource present in same folder/directory.
Example
SourcePage.html
<html>
<body>
<a href="address of the DestinationPage.html">Link text visible on browser screen</a>
</body>
</html>
For live demo, go though below Youtube video:
Comments
Post a Comment