totn HTML

HTML: HTML5shiv

This HTML tutorial explains how to use HTML5shiv (a javascript workaround for IE8 and older) with syntax and examples.

Description

HTML5shiv is a javscript workaround to provide support for the new HTML5 elements in IE Browsers older than IE 9.

Syntax

The syntax for the HTML5shiv is:

<head>
<!--[if lt IE 9]>
  <script src="/js/html5shiv.js"></script>
<![endif]-->
</head>

Note

Example

We will discuss the HTML5shiv below, exploring examples of how to use the HTML5shiv in HTML5, HTML 4.01 Transitional, XHTML 1.0 Transitional, XHTML 1.0 Strict, and XHTML 1.1.