This is a demo of a JavaScript function to remember if an HTML <details> element has been opened after you reload the page.

Your browser should remember if this <details> was open

If you open this element and reload the page, this element will stay open.

Your browser should forget if this <details> was open

If you open this element and reload the page, this element will be closed.