Account
Categories

HTML Attributes


It gives extra information about an element.

They are placed inside the opening tag of an element to give extra information about that element.

Example:

<p style="color: blue;" align="center">This is a paragraph.</p>

In this example:

  • HTML element: <p></p> — opening tag is <p>
  • Attributes:
    • style="color: blue;" — makes the text blue
    • align="center" — puts the text in the center