Types of Links
HTML supports various types of links beyond basic page navigation. Learn about internal anchors, email links, phone links, and more.
Page Anchor Links
Jump to sections within the same page using IDs:
To create anchor links:
- Add
idattribute to target element - Link to
#id-name
Email Links
Email link format:
mailto:email@example.com?subject=Subject%20Text(URL encoded)&body=Message%20body
Phone Links
Phone link format:
- Use
tel:protocol - Include country code for international numbers
- Works great on mobile devices
SMS Links
Fragment Links with Other Pages
You can combine page URLs with fragment identifiers (#section).
Download Links
The download attribute:
- Forces download instead of navigation
- Optionally specify a custom filename
Relative vs Absolute URLs
Choose the right URL type:
- Absolute: External links, links shared elsewhere
- Root-relative (
/path): Internal links, works anywhere on site - Relative (
path): Links within same folder structure
Exercise: Contact Section
Create a contact section with email, phone, and anchor links:
Different link types enhance user experience by providing direct actions for common tasks!
Up next · Lesson 10 of 32
Navigation Structure
2 min read
9 of 32 lessons done

Ask Byte about this lesson
A private chat about this lesson. Byte has read the whole lesson, answers in seconds, and shows the section each answer comes from. Ask follow-ups in any language.
Questions & Answers
Public questions about this lesson. The AI Tutor answers right away in your language, the FreeAcademy team checks answers, and every learner can read them.

