Beginner
An FAQ accordion without JavaScript
Turn the three questions and answers into details elements: the question is the summary, the answer follows it.
The first answer should be open when the page loads, the others closed.
Make it an accordion: opening one answer must close the one that's open. Do it with HTML only.
What Check tests
- There are three
detailselements - Each starts with a
summaryholding the question - The answers are still on the page
- Only the first answer is open at the start
- Opening another answer closes the first
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.