Comon uses of anchor Href Tag and Purpose
SEO Help and Tips
Comon uses of anchor Href Tag and Purpose
Here are some commonly used <a> (anchor) tags and their purposes:
Basic link:
<a href="https://www.example.com">Link Text</a>
This creates a basic hyperlink that directs the user to https://www.example.com when clicked.
Internal link (same page):
<a href="#section">Go to Section</a>
This creates an internal link that navigates to a specific section with the corresponding id attribute on the same page.
Internal link (different page):
<a href="page.html">Go to Page</a>
This creates a link that navigates to a different HTML page (page.html) within the same website.
Anchor link:
<a href="#top">Back to Top</a>
This creates a link that navigates to an anchor with the corresponding id attribute on the same page, typically used to go back to the top of the page.
Email link:
<a href="mailto:example@example.com">Send Email</a>
This creates a link that opens the user's default email client with a pre-filled email to the specified address.
Telephone link:
<a href="tel:+1234567890">Call</a>
This creates a link that prompts the user to call the specified telephone number using their device's default phone app.
File download link:
<a href="file.pdf" download>Download PDF</a>
This creates a link to download a file (file.pdf in this case) when clicked. The download attribute prompts the browser to download the file instead of navigating to it.
These are just a few examples of how the <a> tag can be used with different attributes and values to create various types of links. Remember to use appropriate and descriptive link text for better accessibility and user experience.
Comments
Post a Comment
Thanks for your Comments.