This code creates an interactive, retro-styled HTML table that functions like an accordion. It displays a list of children with their names and birth order (Peter, Louis, and Stephen). Each main row acts as a clickable button; when clicked, it toggles the visibility of an associated hidden row beneath it. This hidden row expands to reveal detailed biographical or comparative information about that specific child's age relative to the others. The page is styled using custom retro gaming fonts (Google Fonts "Press Start 2P" and "VT323"), colorful gradients, and rounded borders, making the data presentation playful and visually engaging.
The functionality is split across three standard web technologies:
To use this code on your own website or local environment, follow these steps:
| Child â„– | First name | Middle name | Surname |
|---|---|---|---|
| 1st Child | Peter | Thomas | Griffin |
| Peter is older than Louis by 3 years, 11 months, 13 days. Peter is older than Stephen by 6 years, 9 months, 24 days. | |||
| 2nd Child | Louis | Michael | Hannant |
| Louis is youger than Peter by 3 years 11 months 13 days. Louis is older than Stephen by 2 years 10 months 13 days. | |||
| 3rd Child | Stephen | David | wright |
| Stephen is youger than Peter by 6 years 9 months 24 days. Stephen is younger than Louis by 2 years 10 months 13 days. | |||