Best of HTMLFebruary 2025

  1. 1
    Article
    Avatar of cloudfourCloud Four·1y

    Lazy loading hidden images

    Browsers now support lazy loading for hidden images using the `loading="lazy"` attribute. This new capability extends lazy loading to images in menus, carousels, and other elements initially hidden from view. Previously, JavaScript solutions were required for these cases, but they are no longer necessary due to recent updates.

  2. 2
    Article
    Avatar of hnHacker News·1y

    This page is under construction

    Encourages creating personal websites to reflect individuality and creativity, promoting the value of owning your content. Critiques the current web development trends towards business and uniformity, and the predominance of social media and AI-generated content. Nostalgic for the early days of the web, it urges a return to simpler, more personal website creation.

  3. 3
    Video
    Avatar of wdsWeb Dev Simplified·1y

    This CSS Property Replaces Hundreds of Lines of Code

    Creating an input field that dynamically grows in size based on the content typically requires extensive JavaScript and complex calculations. The new CSS field sizing property simplifies this process, allowing inputs to resize based on their content with just a single line of CSS. This property supports different types of inputs, including text inputs, select boxes, and text areas, providing an effective progressive enhancement for forms. However, it's currently only supported in Chromium-based browsers.

  4. 4
    Video
    Avatar of wdsWeb Dev Simplified·1y

    The New selectedcontent HTML Element Changes Selects Forever

    A new browser specification allows custom select boxes to be built using only HTML and CSS. This powerful and flexible feature uses a new selected content HTML element and base select styling to replace default browser styles. The feature, currently in stage two, can be tried in Chrome Canary. It ensures graceful fallback to default select boxes in unsupported browsers.

  5. 5
    Article
    Avatar of csstipCSS Tip·1y

    Perfectly center an uppercase text

    Learn how to eliminate unwanted spaces above and below uppercase text using a simple line of CSS code, currently compatible only with Chrome.

  6. 6
    Article
    Avatar of cloudfourCloud Four·1y

    Why I Like Designing in the Browser

    Designing in the browser with HTML, CSS, and JavaScript can be highly advantageous because it allows immediate feedback on how designs will perform and look in a real environment. It offers rapid implementation of new features, better adaptability, and a more fluid design process. The browser's CSS capabilities enable more dynamic and scalable design structures. While dedicated design tools are also useful, especially for early-stage ideation and asset creation, combining both approaches can lead to more effective and versatile design outcomes.

  7. 7
    Article
    Avatar of css_tricksCSS-Tricks·1y

    Container query units: cqi and cqb

    Container query units like `cqi` and `cqb` allow sizing elements based on the size of their container instead of the viewport. `cqi` represents the inline size unit, and `cqb` handles the block size. Additionally, `cqmin` and `cqmax` units evaluate the larger of the container's inline or block size to determine their value, adding flexibility for responsive design.

  8. 8
    Article
    Avatar of frontendmastersFrontend Masters·1y

    HTML & CSS for a One-Time Password Input – Frontend Masters Boost

    The post discusses the design and implementation issues with One-Time Password (OTP) input fields, specifically the common approach of using separate text boxes for each digit. It highlights the user experience challenges and the complexity added by this method. An alternative approach using a single input field styled with background images is explored, emphasizing simplification and improved user interaction.