Posts

Showing posts from November 24, 2016

HTML Imports: Import HTML Files Into Another HTML Files

Image
The greater part of us know about <script src> which we use in stacking JavaScript, <link rel="stylesheet"> for CSS, <img> for pictures, <video> for recordings, and <audio> for sounds. Be that as it may, we don't have a more decisive approach to load HTML.

 While It's conceivable to load HTML with iframes component or the JavaScript technique XMLHttpRequest(). HTML imports give a much cleaner approach to load independent segments into site pages.

HTML Import is an energizing new HTML5 highlight that permit us to incorporate a HTML document into another HTML record. You're not constrained to markup either. An import can likewise incorporate CSS, JavaScript, or whatever else a .html document can contain.

The Markup

The <link> tag is a gift. We can without much of a stretch install templates and JavaScripts required in various archives with it. Be that as it may, rather than utilizing rel="stylesheet", we include the <…