January 10, 20179 yr Hi, I'm used to wrapping a hyperlink around a div to get a block effect I'm after. However I know this is not the correct way of doing this as w3c will see this an invalid. Could someone let me know the proper way of doing this: <a href="link.html"><div class="name"><p>Text</p></div></a>
January 10, 20179 yr Linking block elements is valid as of HTML5. That said, linking the text inside your paragraph, setting that to display block, and using padding is possibly more semantic in this case.
Create an account or sign in to comment