HTML5: Wrap Block-Level Elements with anchor tagsHTML5: Wrap Block-Level Elements with anchor tags

Posted July 27th, 2010 in HTML and CSS and Offsite Articles

David Walsh posted "HTML5: Wrap Block-Level Elements with A’s" which looks at a new feature in HTML5 which allows anchor tags to contain block level elements such as divs. This saves having to put many additional <a> tags within elements to make them all contain the same link, or do workarounds with Javascript.

From the article

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 A tags. Read more

My comments

What's quite interesting about now being able to do this, is that it's been taboo for such a long time so it just doesn't quite feel right. However I'll certainly be embracing it because it will make coding HTML and links so much easier!

Related posts:

Comments

blog comments powered by Disqus