Back to posts

boy boy boy


HTML Anchors Without Quoted Attributes

EDGE CASE: TOC with simple fragment links

Table of Contents

EDGE CASE: heading as anchor target

Introduction to Fragments (jump)

This paragraph links forward and backward. Adjacent anchors test: AcB.

EDGE CASE: skipped heading level

Section Two (Skipped Level)

Mixed marks bold and italic then just italic. Inline code with escaped HTML: <div id=example>.

EDGE CASE: duplicate ids

Duplicate ID First

Linking to #dup usually lands here.

Duplicate ID Second

This intentionally violates uniqueness. Mail email Phone call

EDGE CASE: unicode id

Unicode Section café

Unicode fragment #unicode. Looks like HTML but escaped: <script>alert(1)</script>.

EDGE CASE: list targets

  • First item
    • Nested item
      1. Deep anchor target

Jump to deep list item here.

EDGE CASE: figure as anchor target

Figure caption with marks and TOC link

EDGE CASE: hash inside query

Query plus fragment /path?x=1&y=2#sec-2

---

Note: Anchors may point to non-heading elements like this aside. Self link

Built with Next.js + Sanity