Using and Understanding HTML Element Attributes
Here in chapter five, prepare yourself for a full-scale, in-depth, no-holds-barred discussion on everything related to element attributes. Everything you learned in Chapter 4 will prove to be useful as you apply this knowledge during your journey through attributes. I’ll make sure you have a proper understanding of attributes, how they came about and became part of HTML, and how they fit into the web API. Additionally, you’ll learn how to use attributes to locate DOM elements. Although this is covered a bit in Chapter 4, you’ll find that the coverage here is much more comprehensive. And finally, I’ll dive deeper into attributes and demonstrate how you can read, add, and update them on any DOM element. Special sections on data- and class attributes will be included as well.