Home>Article>Web Front-end> Can html5 iconic attributes be omitted?
html5 Iconic attributes cannot be omitted. If omitted, it is equivalent to not setting the attribute; but the attribute values of some iconic attributes can be omitted. For example, "readonly="readonly"" can be omitted as " readonly". Attributes whose values can be omitted are: readonly, defer, ismap, etc.
The operating environment of this tutorial: windows7 system, HTML5 version, DELL G3 computer
The syntax format of HTML tags
Generally, an HTML tag consists of a start tag, attributes, content and an end tag. The name of the tag is not case-sensitive, but the values of most attributes need to be case-sensitive, as shown below:
属性 ↓PHP中文网↑ ↑ ↑ 开始标签 内容 结束标签
In addition to the class attribute, the start tag can also contain other attribute information, such as id, title, etc. These attributes can provide some additional information for HTML tags, or modify HTML tags. Attributes need to be added in the start tag, and the syntax format is:
attr="value"
attr represents the attribute name, and value represents the attribute value. Attribute values must be surrounded by double quotes " " or single quotes ' '.
html5 Can the iconic attribute be omitted?
html5 The iconic attribute cannot be omitted. If omitted, it is equivalent to not setting the attribute; but the attributes of some iconic attributes The value can be omitted.
For example:
can be omitted as:
The following is a picture about HTML5 that can be omitted Attribute table of attribute values:
Related recommendations: "html video tutorial"
The above is the detailed content of Can html5 iconic attributes be omitted?. For more information, please follow other related articles on the PHP Chinese website!