O'Reilly logo

Web Programming with HTML5, CSS, and JavaScript by Dean

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

1.8 HTML Attributes

Before we formally introduce a few of the different types of meta elements, we first need to discuss attributes, which are used in all meta elements. Container elements provide information between their start and end tags. Void elements (including the meta element) have no end tags, so they can’t provide information that way. Instead, they provide information using attributes. In the following example, charset is an attribute for a meta element:

<meta charset="utf-8">

Most attributes have a value assigned to them. In this example, charset is assigned the value "utf-8". Although most attributes have a value assigned to them, some do not. Later on, we’ll see some attributes that appear by themselves, without a value. You ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required