Can html5 iconic attributes be omitted?

青灯夜游
Release: 2022-06-01 17:44:21
Original
2025 people have browsed it

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.

Can html5 iconic attributes be omitted?

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:

 属性
   ↓
<div class="foo">PHP中文网</div>
 ↑            ↑     ↑
开始标签        内容   结束标签
Copy after login

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"
Copy after login

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 html5 iconic attributes be omitted?

can be omitted as:

Can html5 iconic attributes be omitted?

The following is a picture about HTML5 that can be omitted Attribute table of attribute values:

Can html5 iconic attributes be omitted?

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!