Friday, February 14, 2020

note to self: disclosure panels in html5

I was forgetting the term "disclosures" - in html5 they are the summary/details pairs that let you make accordion-like things easily. (Technically accordions only show one thing at a time, but that's the name that sticks in my head.)

It's the tag <details>, but the  content is hidden except for the <summary> tag which acts like a clickable headline to show the rest.

   <summary>An Example</summary>
   Now that's what I'm talking about

An Example Now that's what I'm talking about

Glad that it's in html5 and we can stop building it over and over!

No comments:

Post a Comment