How HTML5 Shiv fixes issues in IE

Internet Explorer (IE) poses multiple challenges in front of web developers and designers. Though the market share of IE has decreased considerably in past few years, but still large number of users patronize it. This is primarily due to the reason that its still the default browser in Windows OS.

Among multiple issues which developers and designers face while working with IE, one of them is low support of HTML5 tags. This is especially true with lower versions of IE, version below 9, which have a very poor support for HTML5 tags.

Enter HTML5 Shiv in rescue of web developers and designers when using HTML5 tags in IE versions.

HTML5 Shiv is actually a Javascript workaround which enables styling of HTML5 tags in lower versions of IE.

Lets take a look at how lower version of IE treat HTML5 tags which they don’t understand. For example, if we use tag ‘section’ or ‘aside’ in a page then when IE starts parsing this page then it will completely ignore such tags. This way, IE doesn’t even parses these tags which makes it impossible to style them in lower versions of IE.

But if we use HTML5 Shiv, then this Javascript workaround makes IE aware of these tags and forces them to apply styling to them. One way this is done is by running createElement statements as following:

document.createElement(‘section’);

This statement is good enough to make IE aware tags which are not initially understood by it and once IE is aware of a tag then its able to style it too.

Thus, if you want to have a fallback or want to style HTML5 tags in IE, then HTML5 Shiv is kind of a must have utility.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s