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 ...
Get Web Programming with HTML5, CSS, and JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.