HTML Details and Summary: Accordion Without JavaScript (Tested)
Two HTML elements give you a keyboard-friendly accordion with no JavaScript. Open one at a time with name, swap the arrow for +/−, animate it, and fix the screen reader trap.
Notes
Security notes, SOC lab write-ups and tested code by Mahir Faysal, a SOC Level 1 cybersecurity learner in Bangladesh, plus notes from my Next.js and Gemini projects. Sample posts are marked and drafts stay in the admin area.
Two HTML elements give you a keyboard-friendly accordion with no JavaScript. Open one at a time with name, swap the arrow for +/−, animate it, and fix the screen reader trap.
One-line ellipsis needs white-space: nowrap, overflow: hidden and text-overflow: ellipsis. Tested fixes for flexbox, grid and tables, plus 2- and 3-line truncation with line-clamp.
HTML semantic tags explained with examples: header, nav, main, article, section, aside and footer, when to use each, and the div mistakes to avoid.
HTML input types and built-in validation attributes (required, minlength, min, max, step, pattern) with examples tested in Chrome, plus :user-invalid styling.
Another sample article. It explains the basic parts of a page I am practicing in class and at home.
0%