</> Code Corner

HTML · HTML Tutorial · Lesson 5

HTML Attributes

Give elements extra information with attributes.

HTML attributes provide additional information about elements.

  • All HTML elements can have attributes
  • Attributes are always specified in the start tag
  • Attributes usually come in name/value pairs like name="value"

The href Attribute

Example

<a href="https://www.example.com">Visit Example</a>

Keep reading “HTML Attributes”

Sign up to read the full lesson (9 more parts), try every example in the live editor, and take the 5-question quiz.

Chat with us 👋