DIE Community
Ask

Which new CSS and HTML features are safe to use in 2026?

DIEAbdulHadiFounderAsked 1 viewsEdited 20 hours ago
0

The question says it all.

1 answer

  1. 0

    Check a feature's Baseline badge on MDN or web.dev before you use it. "Widely available" means every major browser has had it long enough to rely on. "Newly available" means it works everywhere now, but people on older browsers may not have it yet, so keep a fallback.

    A lot of what used to need a JavaScript library, like tooltips, modals and scroll effects, is turning into plain HTML and CSS. That means less code to ship and less to break.

    What the browsers are working on together

    Interop 2026 was announced on 12 February 2026 by Apple, Google, Igalia, Microsoft and Mozilla. Its 20 focus areas include:

    • anchor positioning, for tooltips and menus that stick to a button
    • container style queries
    • dialogs and popovers, including closedby on <dialog>, the :open pseudo-class and popover="hint"
    • scroll-driven animations and view transitions
    • attr(), contrast-color() and shape()
    • the Navigation API, scroll snap, WebRTC, and IndexedDB getAllRecords()
    • media pseudo-classes such as :playing and :paused

    Interop areas are where browsers agree to fix differences, so these get more reliable through the year.

    What reached Baseline this year

    • February 2026: Trusted Types became Baseline, and Map.getOrInsert() became newly available.
    • August 2026 digest: :paused and sibling-count() became newly available, and Declarative Shadow DOM became widely available.

    How I decide

    1. Look up the feature on MDN or webstatus.dev.
    2. Widely available: use it.
    3. Newly available: use it if the page still works without it. A popover that falls back to a plain link is fine. A checkout that breaks is not.
    4. Only in Interop or behind a flag: experiment in a side project, not on the page that pays your bills.

    Using the platform instead of a library makes your site lighter and faster on cheap phones, and that is most of your visitors.

    Sources:

    Link

Your answer

↑ ↓ to moveEnter to open