Skip to content

Instantly share code, notes, and snippets.

@chriscoyier
Created June 20, 2011 20:20
Show Gist options
  • Save chriscoyier/1036480 to your computer and use it in GitHub Desktop.
Save chriscoyier/1036480 to your computer and use it in GitHub Desktop.
<ul>
<li>
<a href="#">Do a thing</a>
<summary>
?
<details>
Bunch of HTML in here.
<details>
</summary>
</li>
</ul>
@Mottie
Copy link

Mottie commented Jun 20, 2011

According to the HTML5 spec, you have the summary and details tags switched :)

I need to start messing around with these new elements and figure out how they work too.

@chriscoyier
Copy link
Author

That is correct, I do, I was just posting this for someone to help me understand.

Turns out it's pretty interesting and functional. It's a bit like a FAQ UI pattern where you can click on the summary to reveal the details. (toggles the "open" attribute)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment