v150 · HTML · Quirks Mode

Case-sensitive anchor name matching in quirks mode

Chrome 150 makes anchor name matching for fragment navigation case-sensitive in quirks mode, matching the behaviour already used in standards mode. Previously, navigating to #Foo would match <a name="foo"> in quirks mode — this inconsistency is now fixed.

concepts

  1. Anchor Matching Demo

    Tests fragment navigation with different case combinations. In Chrome 150+, #Section only matches name="Section" — not name="section" — in both quirks and standards mode documents.

  2. Quirks vs Standards

    Explains the difference between quirks mode and standards mode documents, how DOCTYPE controls the mode, and why consistent case-sensitive matching matters for interoperability.

  3. Fragment Tester

    Three anchors on one page — name="section", name="Section", name="SECTION". Click each fragment link and watch the live match table: Chrome 150 highlights exactly the right-case anchor and nothing else. A side-by-side panel compares the pre-v150 quirks mode behavior (case-insensitive) with the new consistent behavior, and reports which mode this page is currently in.

  4. Migration Auditor

    Paste any HTML and the tool extracts every <a name="…"> anchor and id attribute, then checks each href="#…" fragment link against them. Any link that only matched because of case-insensitive quirks mode is flagged with the exact mismatch and a suggested fix.

  5. Deep Link Tester

    Enter a list of anchor names and a list of fragment values and run the test. The results table shows for each fragment whether it matches exactly (Chrome 150 behaviour), only case-insensitively (pre-Chrome 150 quirks behaviour), or not at all — making it easy to audit deep links before deploying.

  6. Anchor Case Explorer

    Interactive explorer of the new case-sensitivity rules. Build an anchor with any name, generate fragment links with different capitalizations, and see a live hit/miss matrix. A "quirks simulator" toggle re-enables case-insensitive matching to show the pre-150 behaviour side by side with the corrected Chrome 150 result.

why it shipped

Quirks mode is triggered by missing or non-standard DOCTYPE declarations. In quirks mode, older Chrome versions treated anchor name matching as case-insensitive for fragment navigation (#MySection would find <a name="mysection">). This didn't match Firefox, Safari, or Chrome's own standards mode behaviour. Chrome 150 aligns quirks mode with standards mode — case-sensitive matching everywhere — matching the HTML specification.

the change

<!-- Before Chrome 150 in quirks mode (no DOCTYPE): -->
<a name="footer">Footer section</a>

<!-- Navigating to page.html#Footer (capital F) would find the anchor above.
     Case-insensitive matching in quirks mode → matched "footer" -->

<!-- Chrome 150+: case-sensitive in both modes -->
<!-- page.html#footer → finds <a name="footer"> ✓ -->
<!-- page.html#Footer → does NOT find <a name="footer"> ✗ (no match) -->

<!-- Fix: make anchor names and fragment references use the same case -->
<a name="Footer">Footer section</a>
<!-- → page.html#Footer now matches ✓ -->

references