HTML Attributes

  • HTML Attributes provide metadata about an element
  • Some attributes define behavior
    • The src attribute in <img src="abc.png">
    • The href attribute in <a href="my-page.html">
    • The start attribute in <ol start="5">
  • Others give meaning to elements
    • The id attribute identifies an element to be referenced elsewhere
    • The class attribute marks elements as part of a special category

11 / 22