Skip to content
    SeaCode
    Learning tracksCode ArenaWorkshops & EventsInstructors
    Log inSign up
    </>HTML

    Document foundations

    • What is HTML?
    • Metadata and language
    • Attributes and character references
    • Headings, paragraphs and formatting

    Content and media

    • Links
    • Images
    • Lists
    • Tables
    • Responsive images and media

    Forms

    • Forms and inputs
    • Grouping form controls
    • Form validation and submission

    Structure and accessibility

    • Semantic HTML
    • Keyboard and screen-reader access
    • Disclosure with details
    • Project: your profile page
    HTML

    Structure and accessibility · Lesson 15 of 16

    Disclosure with details

    Native interaction without JavaScript.

    8 minutes2 games

    details provides a native disclosure and summary is its clickable label. Use it for FAQs or supplementary details; essential information should remain discoverable without opening many panels.

    HTML
    <details>
      <summary>Do I need experience?</summary>
      <p>No. Start with the first lesson.</p>
    </details>
    <details open>
      <summary>How do exercises work?</summary>
      <p>Edit the example and run it.</p>
    </details>

    summary

    Keyboard or pointer activation

    Show or hide content

    Important

    Place summary first inside details and give it a clear label. open is a boolean attribute: its presence expands the disclosure.

    Interview question

    Does details require manually managed aria-expanded?

    Complete the code

    Complete the disclosure label.

    <details>
      <>Read more</>
      <p>Extra information</p>
    </details>

    Exercise

    Create an open details containing summary and p.

    HTML

    Learn more from

    • MDN: HTML referencedeveloper.mozilla.org
    • web.dev: detailsweb.dev

    Played 0 of 2 games

    Sign in to save your progress and earn XP.

    PreviousKeyboard and screen-reader accessNextProject: your profile page
    SeaCode

    Learn to code for real, online or at our branch in front of Cairo University, Giza.

    Learn

    • All courses
    • Interactive tutorials
    • Interview practice problems
    • Mock interview
    • Learning tracks
    • Code Arena
    • Workshops & Events
    • Knowledge library
    • Team projects

    Your account

    • Log in
    • Sign up
    • Learning plan
    • Certificates
    • Site map

    Contact us

    • WhatsApp
    • 010 9094 1104
    • In front of Cairo University, Giza

    © 2026 SeaCode. All rights reserved.