HTML Links and Anchors Overview

HTML Links and Anchors

1. Anchor (<a>)

The <a> tag defines a hyperlink, which is used to link from one page to another or to a specific part of the same page.

HTML Example:

<a href="https://codingquestions.in/">Visit My Website</a>
<a href="#section2">Go to Section 2</a>

Explanation:

2. Link to External Resources (<link>)

The <link> tag is used to link external resources, such as stylesheets, to the HTML document. It is typically used within the <head> section of the document.

HTML Example:

Explanation:

Examples on My Website

Visit the following links to see examples of anchor and link tags in action:

Example of Anchor Links on This Page

Back to Top

This is the top of the page. Scroll down to find Section 2.

This is Section 2. Scroll back up to the Top.

Previous Next
Modern Footer