Defining a custom HTML elements by creating a reusable comment element. The comment element with attributes to take in the content, you create an unlimited number of identically structured and styled comments with different content, and placing them by hand in the HTML.
-
Use Custom Elements: Can take a name, email address, and comment as an attribute.
-
Display the name, email address, and attribute, in a custom layout that’s built-in to the component
-
Using the DOM, built a form and custom HTML element with attributes
- created a template element to hold the information
-
Created a class that extends HTML
- using the class to attach Shadow DOM and append the template
-
Defined the class and element with DOM customElements.define