An accordion shows a short summary and lets visitors expand it to reveal associated content, then hide that content again. section 5.2.1
An HTML accordion has two parts:
- The summary is the visible title or description. section 5.2.1
- The details contain the summary and the rest of the content, such as text or images. section 5.2.1
In an online journal, each post can be an accordion: visitors initially see its title and can open it to read the entry. This lets a page hold several posts without overwhelming visitors with content. section 5.2.1
Include a main section where each entry is an accordion using the HTML summary and details elements. For each entry, the summary text is the entry title and the details include the entry date, followed by the entry text. Please provide four sample entries going back four days from today.
A sample prompt asks for journal entries whose summaries are titles and whose details contain dates and entry text. section 5.2.1
