display: block;
}
Add new elements to HTML
You can also add new elements to the HTML page, as the example below adds a named element and defines its style.
Phần tử myHero
Use the JavaScript command document.createElement ('myHero') to create new elements on IE9 and earlier versions.
Problems with Internet Explorer 8
It is possible to use the above solution for all new HTML5 elements. But IE8 and earlier versions do not allow styling on elements it does not know.
So Sjoerd Visscher created HTML5Shiv. This is a JavaScript alternative, allowing styling for HTML5 elements on IE 8 and earlier versions.
HTML5Shiv syntax
HTML5Shiv is placed in the tag, which is the JavaScript file referenced in the tag
Example of HTML5Shiv
If you do not want to download and store HTML5Shiv on your site, you can refer to the version on the CDN page. The HTML5Shiv script must be placed in the element.
Network administration is the technology site, providing the latest technology guides, tips and news.
Link download HTML5Shiv https://github.com/aFarkas/html5shiv or refer to CDN version https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js
Previous article: Introduction to HTML5
The following article: New elements in HTML5