Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • HTML Tutorial
  • HTML Exercises
  • HTML Tags
  • HTML Attributes
  • Global Attributes
  • Event Attributes
  • HTML Interview Questions
  • HTML DOM
  • DOM Audio/Video
  • HTML 5
  • HTML Examples
  • Color Picker
  • A to Z Guide
  • HTML Formatter
Open In App
Next Article:
Interesting Facts About HTML Links and Navigation
Next article icon

Interesting Facts About HTML Links and Navigation

Last Updated : 05 Mar, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

HTML (HyperText Markup Language) is the foundation of web development. One of the most essential components of HTML is links (or anchors), which enable users to navigate between different web pages or sections of the same page.

1. HTTP Link Header for Resource Preloading

Servers can send a Link header to preload resources before the HTML is parsed. This is different from the <link> tag and is used for advanced performance optimization.

HTML
Link: </styles.css>; rel=preload; as=style 

2. <base> Tag for Global URLs

The <base> tag sets a default URL for all relative links, simplifying navigation.

HTML
<base href="https://google.com/"> <a href="about.html">About Us</a>  

3. Tooltip Links with title

Adding a title attribute creates a tooltip when hovering over a link.

HTML
<a href="https://www.geeksforgeeks.org/" title="Visit our homepage">GeeksforGeeks</a> 

4. Multi-Recipient Email Links

You can create a link that sends an email to multiple recipients by separating their email addresses with commas. You can also include a subject line.

HTML
<a href="mailto:[email protected],[email protected]?subject=Hello">Email Us</a> 

5. Link to a Specific Page Section

Using the id attribute, you can create links that navigate to specific sections within the same page. This is particularly useful for long pages with multiple sections.

HTML
<a href="#contact">Go to Contact</a> <h2 id="contact">Contact Section</h2> 

6. rel="nofollow" for SEO Control

The rel="nofollow" attribute tells search engines not to pass ranking value to the linked page. This is often used for user-generated content or untrusted external links.

HTML
<a href="https://example.com" rel="nofollow">External Link</a> 

7. hreflang Attribute for Language Targeting

The hreflang attribute specifies the language of the linked resource. This is useful for multilingual websites, helping search engines serve the correct language version to users.

HTML
<a href="/en/page" hreflang="en">English</a> <a href="/fr/page" hreflang="fr">French</a> 

8. Fragment Identifiers for In-Page Navigation

Fragment identifiers (#) allow you to link to specific sections within a page.

HTML
<a href="#section2">Go to Section 2</a>  <h2 id="section2">Section 2</h2> <p>Content of section 2...</p> 

9. rel="alternate" for Alternative Formats

The rel="alternate" attribute indicates an alternative representation of the current document, such as a PDF version of a webpage.

HTML
<link rel="alternate" type="application/pdf" href="article.pdf"> 



Next Article
Interesting Facts About HTML Links and Navigation

T

tanmxcwi
Improve
Article Tags :
  • HTML

Similar Reads

    How to Add Skip Navigation Links for Better Web Accessibility in HTML?
    Adding skip navigation links in HTML is an essential practice for enhancing web accessibility. These links allow users to bypass repetitive navigation menus and directly access the main content of a webpage, especially for screen reader users or keyboard-only users. This simple addition significantl
    7 min read
    HTML Course | Creating Navigation Menu
    A navigation menu is the first element we see in any website. It allows users to explore different pages and sections easily. In this chapter, you’ll learn how to create a navigation menu in HTML.Course Navigation HTML Course : Creating Navigation MenuIn the last chapter, we have created the entire
    6 min read
    How to Create Navigation Links using HTML5 ?
    In this article, we create a navigation link by using the <nav> tag in the document. The nav element represents a section of the page whose purpose is to provide navigational links, either in the current document or to other documents. The links in the "nav" element may point to other webpages
    1 min read
    How to Convert a Div into a Link in HTML ?
    To transform a <div> into a link, use the we can use anchor tag by wrapping the <div> with it. Set the href attribute of the anchor tag to the desired URL or target location. In this example we will see multiple approaches to do so:Table of Content Using the TagUsing JavaScript event han
    2 min read
    How to Turn an Image into a Link in HTML?
    Turning an image into a clickable link in HTML is a simple process that can enhance user interaction on your website. By wrapping an image inside an anchor tag (<a>), you can make it clickable and redirect users to a different page or website. It allows any image to be a clickable link.Simple
    3 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences