Best of HTMLJune 2025

  1. 1
    Article
    Avatar of communityCommunity Picks·50w

    Just Fucking React to React

    Demonstrates how simple UI patterns like modals, dark mode toggles, forms, and accordions can be implemented using native HTML elements instead of complex React components. Shows side-by-side comparisons between vanilla HTML solutions and their React equivalents, highlighting how native web APIs often provide simpler alternatives to framework-heavy implementations.

  2. 2
    Article
    Avatar of communityCommunity Picks·48w

    <syntax-highlight> element

    A web component library that provides syntax highlighting functionality using the CSS Custom Highlight API. The component can be imported as an ES module or via CDN, used with simple HTML markup by specifying a language attribute, and styled with CSS themes. Limited themes are currently available, but custom themes can be created.

  3. 3
    Article
    Avatar of elixirstatusElixirStatus·49w

    fuelen/html2text

    HTML2Text is a high-performance Elixir library that converts HTML documents to plain text using Rust NIFs. It leverages Rust's html2text crate for fast parsing while maintaining content structure and readability. The library offers a simple API with HTML2Text.convert/2 function that accepts HTML content and line width parameters, supporting features like heading conversion, list formatting, table rendering, and link preservation.

  4. 4
    Article
    Avatar of css_tricksCSS-Tricks·50w

    Creating an Auto-Closing Notification With an HTML Popover

    Learn how to create auto-closing notifications using HTML popover attributes combined with CSS transitions and JavaScript ResizeObserver. The technique uses CSS height transitions with @starting-style and transition-delay to visually hide the popover, while ResizeObserver detects when the animation completes to properly close the popover element. Includes fallback strategies for when JavaScript is disabled.

  5. 5
    Article
    Avatar of freekFREEK.DEV·51w

    PHP 8.4's new Dom\HTMLDocument in Diffs

    PHP 8.4 introduces a new Dom\HTMLDocument class that provides improved HTML document handling with better standards compliance and fixes for long-standing bugs present in the legacy DOMDocument class. This new implementation makes HTML manipulation more reliable and easier to work with for developers.

  6. 6
    Article
    Avatar of css_tricksCSS-Tricks·51w

    Getting Creative With HTML Dialog

    The HTML dialog element provides built-in accessibility and styling capabilities for creating modal and non-modal dialogue boxes. Beyond basic styling with border radius and box shadows, developers can create branded, story-driven designs using CSS pseudo-elements like ::backdrop, backdrop-filter, and animations. The element includes native features like focus trapping, ESC key support, and show/hide methods. Creative styling opportunities include using :has and :valid selectors for interactive form validation feedback, applying custom background images to both the dialog and its backdrop, and adding animations that reflect brand personality while maintaining accessibility standards.

  7. 7
    Article
    Avatar of chromeChrome Developers·49w

    HTML spec change: escaping < and > in attributes

    The HTML specification was updated to escape < and > characters in attributes when serializing DOM to HTML strings, helping prevent mutation XSS vulnerabilities. This change affects innerHTML, outerHTML, and getHTML() methods but doesn't impact HTML parsing or DOM APIs like getAttribute(). The update is rolling out in Chrome 138, Firefox 140, and Safari 26, potentially breaking code that relies on innerHTML/outerHTML for attribute extraction and end-to-end tests expecting unescaped characters.

  8. 8
    Article
    Avatar of webkitWebKit·47w

    A step into the spatial web: The HTML model element in Apple Vision Pro

    visionOS 26 introduces the HTML model element as a default feature, enabling developers to embed 3D USDZ models directly in web pages for Apple Vision Pro. The element provides a simple API for displaying stereoscopic 3D content with features like orbit mode for user interaction, entity transforms for positioning, environment mapping for realistic lighting, and animation controls similar to video elements. The implementation supports the spatial web vision by making 3D content integration easier than traditional WebXR approaches.