There are a few changes to elements and new elements in HTML5. One of those elements is the a element, or anchor element. It’s used to create hyperlinks. There are a few changes to this element.
-
The
nameattribute is obsolete.You can no longer use something like…<a name="whatever"></a><div>Some content.</div>
Instead, put an
idon the nearest container…<div id="whatever">Some content.</div>
-
The
targetattribute has changed.This used to be deprecated, but now it’s not. Go ahead and use it.<a href="http://blog.strimble.com/" target="_blank">blog</a>
-
There is a new
mediaattribute.This is the type of media that the destination of the hyperlink was designed for.<a href="http://blog.strimble.com/" media="screen">blog</a>
Post a Comment