What kind of information do attributes provide?



This exercise says that attributes can provide information. What kind of information do attributes provide?


There are several different types of attributes which can extend tags in different ways. Usually attributes either change an element’s behavior, provide metadata about the element, or provide labeling information about the element. For example, the id attribute uniquely identifies an element whereas the class attribute identifies a whole group of elements. This labeling information can then be used to target content for styling, scripting, or (for the id attribute) linking. For more information about these attributes, check out classes vs ids.

FAQ: Learn HTML Elements - Intro to HTML - Attributes

+ =


importance of class and attributes??