Event driven (Clone)

If we want to expand an element’s tag, we can do so using an attribute. Attributes are content added to the opening tag of an element and can be used in several different ways, from providing information to changing styling. Attributes are made up of two parts:

  • The name of the attribute

  • The value of the attribute
One commonly used attribute is the id. We can use the id attribute to specify different content (such as <div>s) and is really helpful when you use an element more than once. ids have several different purposes in HTML, but for now we’ll focus on how they can help us identify content on our page.
When we add an id to a <div>, we place it in the opening tag:
/* ]]> */