In this video I show you how to code attributes in the HTML5 webpage.
- An attribute consists of the attribute name, an equals sign, and the value of the attribute
- Attribute values don’t have to be enclosed in quotes if they don’t contain spaces
- Attribute values must be enclosed in single or double quotes if they contain one or more spaces, but you can’t mix the type of quotation mark used for a single value.
- Boolean attributes can be coded as just the attribute name. They don’t have to include the equals sign and a value that’s the same as the attribute name.
- To code mulitple attributes, separate each with a space.