What tags should be used for a large clickable div having a button.
It is preferred to make every clickable thing a button or link so that it is focusable using keyboard.
But in this case, these two big boxes are clickable and each of them has an extra button as well.
What tags should I use here?
Would there be a button inside a button?
3 Replies
Looks like
<input type="radio" id="some-id" />
, but it is all wrapped within a <label for="some-id">...</label>
.
and they both should have same name
attribute of courseGeneral rule is that buttons are for actions inside the page or POST actions like form submissions, and <a> is for navigation to new pages. If it opens a modal, it should be a button. If it navigates to the contact page, it should be an A tag
Right
Thank you both!