Content · Web Development · HTML

HTML Hidden Until Found: hidden="until-found"

Hidden Until Found: hidden="until-found": The result depends on browser support and, in examples with script elements, on JavaScript being allowed. Includes a practical HTML example and an explanation.

1 views Published Oct 19, 2026 Updated Oct 19, 2026 Admin

Let’s take one interactive feature apart so the markup and behavior make sense separately.

What You Need to Know


Hidden until found keeps content collapsed while allowing supported browsers to reveal it when a find-in-page or fragment search locates it. Test fallback behavior because the feature is not identical to ordinary hidden.

In this example: reveal collapsed documentation text on find.

Try the Example


Take a look at the example. We’ll explain the important lines right below it.

<section hidden="until-found" id="answer">
    <h2>Water boils at different temperatures depending on pressure</h2>
    <p>This paragraph can be revealed by supported find-in-page behavior.</p>
</section>

Let’s Read the Code


  • <section>: A section groups content with a shared topic.
  • <h2>: A heading divides the page into understandable parts.
  • hidden: Hidden removes content from ordinary presentation; some special values have different behavior.
  • id: An id uniquely identifies an element on this page.

Read the named elements and attributes together. They explain how the browser connects this feature to the rest of the page.

What Happens in the Browser?


When this example includes JavaScript, it supplies behavior that ordinary HTML does not automatically provide. Always think about a fallback.

Start with native behavior. Details, dialog, and popover each solve a different interface problem. Choose the simplest control that actually matches what a visitor wants to do, then test focus and dismissal as well as appearance.

Your Turn


Run this on a local development server if it loads modules or resources. Change the visible text or trigger and check what still works with scripts disabled.

Common Beginner Mistakes


  • Assuming new HTML syntax works in every browser without testing.
  • HTML supplies structure; JavaScript is necessary for the scripted behavior in this example. Check keyboard access and focus movement too.

Key Takeaways


  • Hidden until found keeps content collapsed while allowing supported browsers to reveal it when a find-in-page or fragment search locates it.
  • <section>: A section groups content with a shared topic.
  • Test the behavior you expect rather than trusting how the snippet looks in your editor.
Share this resourceSend this page to someone who may find it useful.