# afarkas/html5shiv

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/afarkas-html5shiv).**

9,849 stars · 2,514 forks · JavaScript

## Links

- GitHub: https://github.com/aFarkas/html5shiv
- Homepage: http://paulirish.com/2011/the-history-of-the-html5-shiv/
- awesome-repositories: https://awesome-repositories.com/repository/afarkas-html5shiv.md

## Description

html5shiv is a JavaScript compatibility polyfill and legacy browser shim that enables the use of HTML5 sectioning elements in outdated versions of Internet Explorer. It provides a compatibility layer that ensures modern HTML5 tags are recognized and rendered correctly by overriding element creation methods.

The library ensures that HTML5 sectioning elements contain their child elements in old web engines by applying basic styles. It specifically addresses layout and styling discrepancies for both screen and print media to prevent layout collapse.

The project includes a programmable configuration system that allows the internal registry to be extended with custom HTML5 elements.

## Tags

### Web Development

- [Legacy Browser Support](https://awesome-repositories.com/f/web-development/browser-integration-utilities/browser-compatibility-utilities/legacy-browser-support.md) — Provides a compatibility layer that adds support for HTML5 sectioning elements in legacy browsers via method overriding and styling. ([source](https://github.com/afarkas/html5shiv#readme))
- [Feature Detection Polyfills](https://awesome-repositories.com/f/web-development/feature-detection-polyfills.md) — Implements script-based workarounds to emulate modern web standard features in outdated browser environments.
- [HTML5 Compatibility Polyfills](https://awesome-repositories.com/f/web-development/html5-compatibility-polyfills.md) — Provides a JavaScript library that enables the use of HTML5 sectioning elements in legacy versions of Internet Explorer.
- [Sectioning Element Emulation](https://awesome-repositories.com/f/web-development/html5-media-players/sectioning-element-emulation.md) — Applies basic styles and logic to HTML5 sectioning elements to ensure they contain children in old web engines.
- [Container Style Injections](https://awesome-repositories.com/f/web-development/client-side-components/script-injection-mechanisms/dom-script-injection/ui-element-injection/container-style-injections.md) — Applies basic CSS display properties to ensure HTML5 elements behave as block-level containers in old web engines.

### User Interface & Experience

- [Browser Style Normalizers](https://awesome-repositories.com/f/user-interface-experience/browser-style-normalizers.md) — Fixes element containment and styling issues across different legacy browser engines to ensure consistent rendering.
- [DOM Element Creation Overrides](https://awesome-repositories.com/f/user-interface-experience/styling-theming-systems/content-styling/component-styling-tools/component-styling/element-tag-overrides/element-tag-overrides/dom-element-creation-overrides.md) — Replaces native element creation functions to force legacy browsers to recognize and instantiate HTML5 sectioning tags.
- [Print Stylesheets](https://awesome-repositories.com/f/user-interface-experience/print-stylesheets.md) — Modifies the display properties of sectioning elements specifically for print media queries to prevent layout collapse.
- [Element Tag Overrides](https://awesome-repositories.com/f/user-interface-experience/styling-theming-systems/content-styling/component-styling-tools/component-styling/element-tag-overrides/element-tag-overrides.md) — Provides a programmable mapping system to determine which HTML5 tags should be overridden and processed.
