Details tag is not a correct semantic tag to use for navigation. You should always use nav tag. Also, in case of multi-level navigation details would not work correctly.
It's a proof it works - sometimes. "Dropdown effect" is not the core behaviour of the details tag, it's a browser behaviour. Meaning - you don't have a control of how the browser will display that dropdown. Also, let's say you have a dropdown but you want the text that opens a dropdown also to be a link. a tag will not work in summary tag, neither will it expand the content.
So, can you use it? Yes. Should you use it? No. Simply, there are better ways to do it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Details tag is not a correct semantic tag to use for navigation. You should always use nav tag. Also, in case of multi-level navigation details would not work correctly.
It's a proof it works - sometimes. "Dropdown effect" is not the core behaviour of the details tag, it's a browser behaviour. Meaning - you don't have a control of how the browser will display that dropdown. Also, let's say you have a dropdown but you want the text that opens a dropdown also to be a link. a tag will not work in summary tag, neither will it expand the content.
So, can you use it? Yes. Should you use it? No. Simply, there are better ways to do it.