HTML Links
Learn how to create hyperlinks to navigate between pages and websites
Introduction to HTML Links
The <a> tag defines a hyperlink, which is used to link from one page to another.
Basic Link Example:
<a href="https://www.codingrider.com">Visit Coding Rider</a>
Types of Links
External Link (to another website):
<a href="https://www.codingrider.com">Visit Coding Rider</a>
Linking to Other Pages
You can link to other pages within your website using relative URLs.
<a href="about.php">About Us</a>
Linking to Sections within a Page
You can link to specific sections of a page using anchors.
<a href="#section1">Go to Section 1</a>
Linking to Email Addresses
You can create links that open the user's email client.
<a href="mailto:support@codingrider.com">Email Us</a>
Link Attributes:
href- Specifies the URL of the page the link goes totarget- Specifies where to open the linked document (e.g.,_blankfor new tab)title- Specifies extra information about the link
<a href="https://www.codingrider.com" target="_blank" title="Example Website">Visit Coding Rider</a>
Linking to Other Pages
You can link to other pages within your website using relative URLs.