
Anonymous A. answered 12/21/19
HTML Expert with 10+ years of experience
Hello,
The purpose of HTML is to markup content. A <div> isn't made for mouse interactions, a.k.a. clicks.
Now, the way you describe it, it's the right way to do it: you wrap the <div> in an <a> tag. The 'clickable' element is the anchor so everything in it is automatically clickable.
On a different note, XHTML is no longer being developed and you shouldn't build anything with this HTML variation. In other words, ditch XHTML and straight up use HTML5.
Also, don't worry too much about validation, as long as you are writing proper HTML tags for the right type of content, you're in good shape.
Let me know if you have any questions.
Regards.