Skip to Main Content
The HTML and CSS Workshop
book

The HTML and CSS Workshop

by Lewis Coulson, Brett Jephson, Matt Park, Marian Zburlea, Tiffany Ford, Terry O'Brien, Adam Rosson, SudarshanReddy Kurri
November 2019
Beginner content levelBeginner
700 pages
12h 19m
English
Packt Publishing
Content preview from The HTML and CSS Workshop

12. Web Components

Overview

By the end of this chapter, you will be able to create custom elements to use on a web page; encapsulate the structure and styles of a custom element with the Shadow DOM; create a simple-modal using HTML templates; and create and share your own web component. This chapter introduces the three technologies used to create web components – custom elements, the Shadow DOM, and HTML templates – and how they can be combined to make reusable components.

Introduction

In the previous chapter, we learned about the techniques we can use to ensure we are writing in a well-supported standard. In this chapter, we will use many of these techniques to create web components – bits of UI that we can safely share across multiple ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Enough HTML, CSS and Layout to Be Dangerous: An Introduction to Modern Website Creation and Templating Systems

Learn Enough HTML, CSS and Layout to Be Dangerous: An Introduction to Modern Website Creation and Templating Systems

Michael Hartl, Lee Donahoe

Publisher Resources

ISBN: 9781838824532Supplemental Content