Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

html collapsible div without javascript

I wanted to have some collapsible contents in html without using javascript. I was fine using css, but a brief Internet search revealed this gem: css - Collapse without javascript - Stack Overflow

Just use the detail tag. That's it.

<detail><summary>Instructions</summary>Install the application underneath /usr/bin, and the desktop icon in /usr/share/applications.</detail>

Let's see if what I put below works in the final rendered web page.

InstructionsInstall the application underneath /usr/bin, and the desktop icon in /usr/share/applications.

References

In-line.

Comments