You can teach older browsers to handle HTML5 correctly.
HTML5 Browser Support
HTML5 is supported in all modern browsers.
In addition, all browsers, old and new, automatically handle unrecognized elements as inline elements.
Because of this, you can “teach” older browsers to handle “unknown” HTML elements.
You can even teach IE6 (Windows XP 2001) how to handle unknown HTML elements.
Define Semantic Elements as Block Elements
HTML5 defines eight new semantic elements. All these are block-level elements.
To secure correct behavior in older browsers, you can set the CSS display property for these HTML elements to block:
Add New Elements to HTML
You can also add new elements to an HTML page with a browser trick.
This example adds a new element called <myHero> to an HTML page, and defines a style for it:
<myHero>My Hero Element</myHero>
Problem With Internet Explorer 8
You could use the solution described above for all new HTML5 elements.
However, IE8 (and earlier) does not allow styling of unknown elements!
You will require the HTML5shiv to provide compatibility for IE Browsers older than IE 9.
Syntax For HTML5Shiv
The HTML5Shiv is placed within the <head> tag.
You should use the HTML5Shiv when you are using the new HTML5 elements such as:
This Post Has One Comment
Pingback: HTML5 Semantic Elements – Learn HTML