In this chapter, through multiple exercises and activities, we have looked at the features that have been added to HTML5 that allow us to create web components. We have learned how to create a custom HTML element and how to define the behavior of that custom element. We have also learned about the Shadow DOM and how we can use it to encapsulate our custom elements; in other words, we have learned how to keep our custom elements safe from outside influences and prevented them, in turn, from polluting the rest of a web page. Finally, we have learned how to create HTML templates that make our custom elements more flexible and allows us to reuse components in more situations.
Combining all of these features of HTML5, we have applied our new knowledge to create a modal and a blog-headline element, and we have learned how to create web components that can interact with one another to make reusable, versatile UI components that can be used across multiple projects.