<a> (anchor) element - changes from HTML4.
As in HTML4 the anchor element contains a link to another page or resource and is the basis of both website and Internet navigation.
Block and inline.
One of the major changes to the
<a> element is that it can now be used on flow (block) content such as paragraphs or
<div> elements whereas
in HTML4 it could only be used with phrasing (inline) content.
New media attribute.
The media attribute details the media which the destination link is intended for and takes the form of a media-query list detailing media types such as print, screen and speech coupled with media features such as width, height, color, resolution etc.
The name, charset, coords, shape and rev attributes have been declared obsolete in the HTML5 specification and should not be used by Web developers although it is always a good idea to know what they do as you may come across them in sites which are already online.
- HTML5 GLOBAL ATTRIBUTES
- href - a URL (address) giving the destination location of the linked resource
- hreflang - gives the language at the destination of the link
- media - indicates the media (screen, print, braille etc.) on which the destination link is intended to be viewed - a Media Query list.
- rel - specifies the relationship between the ancor and the link destination.
- target - where the link document should be opened in relation to the current widow - can either be one of the keywords "_blank", "_self", "_parent" or "_top" or a 'browsing-context name'.
- type - indicates the MIME type (text, image, audio, video etc.) of the destination link.