Attributes: Configuring an Element
What this is. An attribute provides extra information about an element. Attributes are written inside the opening tag, usually as a name and a value in quotes.
<a href="/about">About</a>
Some attributes are boolean: their presence alone is the value. <button disabled> is disabled. There is no disabled="false".
Why you cannot substitute one attribute for another. Attributes have specific meanings that browsers and assistive technology rely on. alt is not a caption, it is the text alternative. href is not a label, it is a destination. Using the wrong attribute because the visible result happens to look acceptable will break the page for someone using it differently from you.
Mark this lesson complete
Signed in, your progress follows you to every device.