HTML Imports

Obsolete since Google Chrome 73
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Firefox will not ship HTML Imports in its current form. See this status update for more information. Until there is a consensus on the standard or alternative mechanisms are worked out, you can use a polyfill such as Google's webcomponents.js.

HTML Imports is intended to be the packaging mechanism for web components, but you can also use HTML Imports by itself.

You import an HTML file by using a <link> tag in an HTML document like this:

<link rel="import" href="myfile.html">

The import link type is new.

Specification

Specification Status Comment
HTML Imports Working Draft Initial definition.

Browser compatibility

No compatibility data found. Please contribute data for "html.elements.link.rel.import" (depth: 1) to the MDN compatibility data repository.