Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Error’d: Pickup Sticklers

      September 27, 2025

      From Prompt To Partner: Designing Your Custom AI Assistant

      September 27, 2025

      Microsoft unveils reimagined Marketplace for cloud solutions, AI apps, and more

      September 27, 2025

      Design Dialects: Breaking the Rules, Not the System

      September 27, 2025

      Building personal apps with open source and AI

      September 12, 2025

      What Can We Actually Do With corner-shape?

      September 12, 2025

      Craft, Clarity, and Care: The Story and Work of Mengchu Yao

      September 12, 2025

      Cailabs secures €57M to accelerate growth and industrial scale-up

      September 12, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Using phpinfo() to Debug Common and Not-so-Common PHP Errors and Warnings

      September 28, 2025
      Recent

      Using phpinfo() to Debug Common and Not-so-Common PHP Errors and Warnings

      September 28, 2025

      Mastering PHP File Uploads: A Guide to php.ini Settings and Code Examples

      September 28, 2025

      The first browser with JavaScript landed 30 years ago

      September 27, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured
      Recent
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»News & Updates»A Few Things About the Anchor Element’s href You Might Not Have Known

    A Few Things About the Anchor Element’s href You Might Not Have Known

    August 15, 2025

    I love “re-learning” things I thought I knew. HTML is full of those opportunities (case in point, like today) since it’s where you typically start learning about web development. And in those early days, you don’t know what you don’t know.

    So, thanks Jim Nielsen for giving me a reason to give URL patterns another look. It’s easy to take URL superpowers for granted, even if you already have these patterns under your belt.

    The patterns:

    <a href="#"> <!-- Scrolls to the top of a document -->
    <a href=""> <!-- Reloads the current page, preserving the search string but removing the hash string (if present). -->
    <a href="."> <!-- Reloads the current page, removing both the search and hash strings -->
    <a href="?"> <!-- Reloads the current page, removing both the search and hash strings (keeps `?`) -->
    <a href="data:"> <!-- Link to data URLs, like text fragments -->
    <a href="video.mp4#t=10,20">  <!-- Links to specific parts of a media file -->

    But do yourself a favor and read Jim’s full post. He gets way more into the weeds, referencing the specification and stress testing different configurations. I mean, this is gold:

    But I’m writing because #top will also scroll to the top if there isn’t another element with id="top" in the document. I didn’t know that.

    Me neither.


    A Few Things About the Anchor Element’s href You Might Not Have Known originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleError’d: Abort, Cancel, Fail?
    Next Article Covering hidden=until-found

    Related Posts

    News & Updates

    Building personal apps with open source and AI

    September 12, 2025
    News & Updates

    What Can We Actually Do With corner-shape?

    September 12, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    Swift Apprentice: Fundamentals [SUBSCRIBER]

    Learning Resources

    YouTube Music just copied one of Spotify’s best features – what’s new

    News & Updates

    A Coding Guide to Unlock mem0 Memory for Anthropic Claude Bot: Enabling Context-Rich Conversations

    Machine Learning

    AI Won’t Replace Developers, But It Will Leave Some Behind

    Tech & Work

    Highlights

    Auth0Alternatives – Discover authentication provider alternatives to Auth0

    August 15, 2025

    Post Content Source: Read More 

    Redwood is coming…

    April 24, 2025

    How we’re supporting better tropical cyclone prediction with AI

    June 12, 2025

    Is Anxiety Disorder a Neurological Disorder?

    June 11, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.