Possible code for making dropdowns

I would like dropdowns to be closed when the page opens and also the icons should be offset from the text for expanding and clicking dropdowns. And the output of my project would be dropdown is displayed as open. Is it possible?
