HTML5: Wrap Block-Level Elements with A’s
HTML5 presents a simpler line of thought with HTML than XHTML. And quite honestly, it's a much needed simplification. One of those simplifications is the ability to wrap block-level elements like
DIVs, H-tags, and
P's with basic
A elements. You read that correctly: wrap block-level elements with
<body> <a href="/about-page.php"> <div class="article"> <h1>About David Walsh</h1> <p> I'm a 27 year old Web Developer and jQuery & MooTools Consultant working from Madison, Wisconsin. I am Founder and Lead Developer for Wynq Web Labs. I don't design the websites, I just make them work. </p> </div> </a> </body>
There you have it. A simple A element wrapping
P's. Note that you may not wrap
A elements with larger
What Do You Think?
Dirty. Much prefer href attributes for any element, though I realize that there are semantic/accessibility issues there as well.