Learn about HTML imports and how they can make it easier to reuse content among multiple pages and projects.
All these ways of including content in the page…makes it easier to build modular pages…and promotes the reuse of assets.…This way any single asset, such as this image,…can easily be used in more than one page.…Isn't it interesting then that there's never been…a standard way of including…arbitrary HTML code itself in a webpage.…You can accomplish this a few different ways,…such as by using Ajax,…but historically there's been no standard way…of telling the browser to just include…a chunk of HTML code that you want to reuse.…
Joe Marini starts the course by going into HTML templates, which provide a browser-native way to declare sections of HTML markup that will be used frequently in your app. Next, he covers HTML imports, explaining how to use them and create reusable modules. Then, he takes you through working with custom elements. To wrap up the course, he discusses Shadow DOM and how to create Shadow DOM to define custom element structure and rendering within a page.
- Web standards
- Customizing web components
- Activating and using templates
- Using HTML imports
- Creating reusable modules
- Defining custom elements
- Customizing elements and styles
- Creating Shadow DOM
- Styling and Shadow DOM