


HTML5 study notes concise version (9): changing elements and attributes
Changed elements (Element)
The usage of the following elements in HTML5 has been slightly modified so that they can be used better or play a greater role in the web:
No href attribute The a element will be displayed as a placeholder, and the a element now supports flow content type elements (for example: article, input, span, etc.).
address can be scoped by article, aside, nav, section. Previously it could only be applied to the global scope. The
b element is now described as a piece of text that only stands out stylistically in a normal article and does not contain any additional importance. For example: keywords in document summaries, product names in comments. Or a typesetting method that represents emphasis. In addition, according to the HTML5 specification, title text should use
to
, emphasis text should use , important text should use , mark highlighted text should use , and other aspects. Only use .
Cite is used to indicate an introduction. The so-called introduction is a reference to a book, a report, or other published source material. You can use this tag to define a reference to a reference, such as the title of a book or magazine. This meaning (a person's name) in HTML4 will no longer apply.
The dl element is represented as a group containing multiple name-values, and is no longer just represented as the original meaning of HTML4.
The head element is no longer allowed to contain object sub-elements.
The hr element defines a theme change in the content and is displayed as a horizontal line, no longer just a horizontal line.
i element is now described as a piece of text that highlights different opinions or tone or other in ordinary articles, for example: a classification name, a technical term, a proverb in a foreign language, an idea, etc. Or represent the italic typesetting style
label element. The browser will no longer move the focus from the label to the control unless the underlying platform user interface is standardized.
The menu element has been redefined to be more useful under toolbars and context menus. The content marked by the
s element is no longer precise and important. It is not recommended to use it. It is recommended to use . The
small element renders marginalia as small text, and disclaimers, cautions, legal restrictions, or copyright statements are often characterized by small text. Small text is also sometimes used for news sources, licensing requirements. The small element does not de-emphasize or reduce the importance of text that is emphasized by an em element or marked as important by a strong element. The
strong element is represented as important text, rather than as emphasis text with a stronger tone. The
u element represents an underline, and the content is a piece of ambiguous text, or text that is wrong but still needs to be displayed, or a proper noun (such as a Chinese vocabulary).
Changed attributes (Attribute)
The value attribute of the li element has been re-enabled. It was restricted in 4.0, but this attribute has been reused in HTML5. Similarly, the start attribute of ol has also been re-enabled. Enabled. Note: The value value is only the index value, not the sorting value.
For example:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<figure>
<figcaption>The top 10 movies of all time</figcaption>
<ol>
<li value=
"10"
><cite>Josie
and
the Pussycats</cite>, 2001</li>
<li value=
"9"
><cite>Црна мачка, бели мачор</cite>, 1998</li>
<li value=
"8"
><cite>A Bug's Life</cite>, 1998</li>
<li value=
"7"
><cite>Toy Story</cite>, 1995</li>
<li value=
"6"
><cite>Monsters, Inc</cite>, 2001</li>
<li value=
"5"
><cite>Cars</cite>, 2006</li>
<li value=
"4"
><cite>Toy Story 2</cite>, 1999</li>
<li value=
"3"
><cite>Finding Nemo</cite>, 2003</li>
<li value=
"2"
><cite>The Incredibles</cite>, 2004</li>
<li value=
"1"
><cite>Ratatouille</cite>, 2007</li>
</ol>
</figure>
Copy after loginThe above code can also be implemented using the reversed attribute of the ol element:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<figure> <figcaption>The top 10 movies of all time</figcaption>
<ol reversed>
<li><cite>Josie
and
the Pussycats</cite>, 2001</li>
<li><cite>Црна мачка, бели мачор</cite>, 1998</li>
<li><cite>A Bug's Life</cite>, 1998</li>
<li><cite>Toy Story</cite>, 1995</li>
<li><cite>Monsters, Inc</cite>, 2001</li>
<li><cite>Cars</cite>, 2006</li>
<li><cite>Toy Story 2</cite>, 1999</li>
<li><cite>Finding Nemo</cite>, 2003</li>
<li><cite>The Incredibles</cite>, 2004</li>
<li><cite>Ratatouille</cite>, 2007</li>
</ol>
</figure>
Copy after logina and the target attribute of the area element are re-enabled, because in the web program Very useful, for example, when used with iframes.
The type attribute of script and style elements is no longer required if the script is ECMAScript compliant or the style language is CSS.
The border attribute value of the table element can only be set to "1" or an empty string.
The following attributes are still allowed to be used, but better alternatives are recommended:
The language attribute of the script element must be set to "JavaScript" (case-insensitive) when used. And it cannot conflict with the type attribute. Users can ignore this attribute.
For the name attribute of the a element, users can use id instead.
The width and height attributes of the img element and all other elements no longer allow setting values to percentage numbers.
The above is the concise version of HTML5 study notes (9): the content of changing elements and attributes. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!
small element renders marginalia as small text, and disclaimers, cautions, legal restrictions, or copyright statements are often characterized by small text. Small text is also sometimes used for news sources, licensing requirements. The small element does not de-emphasize or reduce the importance of text that is emphasized by an em element or marked as important by a strong element. The
strong element is represented as important text, rather than as emphasis text with a stronger tone. The
u element represents an underline, and the content is a piece of ambiguous text, or text that is wrong but still needs to be displayed, or a proper noun (such as a Chinese vocabulary).
Changed attributes (Attribute)
The value attribute of the li element has been re-enabled. It was restricted in 4.0, but this attribute has been reused in HTML5. Similarly, the start attribute of ol has also been re-enabled. Enabled. Note: The value value is only the index value, not the sorting value.
For example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
The above code can also be implemented using the reversed attribute of the ol element:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
a and the target attribute of the area element are re-enabled, because in the web program Very useful, for example, when used with iframes.
The type attribute of script and style elements is no longer required if the script is ECMAScript compliant or the style language is CSS.
The border attribute value of the table element can only be set to "1" or an empty string.
The following attributes are still allowed to be used, but better alternatives are recommended:
The language attribute of the script element must be set to "JavaScript" (case-insensitive) when used. And it cannot conflict with the type attribute. Users can ignore this attribute.
For the name attribute of the a element, users can use id instead.
The width and height attributes of the img element and all other elements no longer allow setting values to percentage numbers.
The above is the concise version of HTML5 study notes (9): the content of changing elements and attributes. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.
