Amazon interview question

I was asked to write HTML/CSS/JavaScript code for implementing an accordion.