Attributes and values

Boilerplate code

Here is the boilerplate code again for reference.

Intro

There are two other terms we need to talk about: attributes and values. We can see examples of attributes and values with the meta elements on lines 4 through 6. The attributes and values are the extra bits of text inside the tags.

Attributes and values add additional information to your HTML elements.

Attributes

The attributes are the text before the equals signs.

Some examples are the charset attribute on line 4, the content attribute on line 5, and the name attribute on line 6.

Values

The values are the text in quotes after the equals signs. Some examples are the "UTF-8" text on line 4, the "IE=edge" text on line 5, and the "viewport" text on line 6.

End

All of the examples here show attributes and values together. However, some attributes don’t require values. For those attributes, you’ll just see the attribute name without an equals sign or a value in quotes.

We’ll see more examples of attributes when we cover anchor elements and image elements.

Complete and Continue