HTML Link Bookmarks Guide

Learn how to create and use bookmarks for in-page navigation

⏱️ Reading time: 0 minLast updated: 10/7/2025

Introduction to HTML Bookmarks

HTML bookmarks (also called fragment identifiers or anchor links) allow you to create links that jump to specific sections of a webpage. They're essential for:

  • Creating table of contents navigation
  • Linking to specific content sections
  • Improving user experience on long pages
  • Creating "Back to top" functionality
  • Building single-page application navigation

This guide covers all aspects of creating and using HTML bookmarks effectively.

Creating Bookmarks

How to create anchor points in your page that can be linked to

Usage: Use id attributes on any element to create bookmark targets

Linking to Bookmarks

How to create links that jump to specific sections of a page

Usage: Use # followed by the id to link to bookmarks

Table of Contents

Create a navigation menu that links to page sections

Accessible navigationSticky positioningSemantic HTML

Smooth Scrolling

Add smooth scrolling behavior for better user experience

Why this matters: Smooth scrolling makes navigation more pleasant and professional

Back to Top Button

Create a button that returns users to the top of the page

Why this matters: Helpful for long pages to improve navigation

URL Hash Detection

Highlight the current section in navigation based on URL hash

Use Case: For long documentation pages or single-page applications

Bookmarks Playground

Experiment with different bookmark techniques in our live editor

Bookmark Examples Preview

Ready-to-use examples covering different bookmark scenarios

Live Preview
< PreviousNext >