HTML5 learning notes simplified version (9): changed elements and attributes, html5 learning notes

Source: Internet
Author: User

HTML5 learning notes simplified version (9): changed elements and attributes, html5 learning notes
Element)

The usage of the following elements in HTML5 is slightly modified to make better use of the web or play a greater role:

  1. Element a without the href attribute will be displayed as a placeholder, and element a now supports elements of the flow content type (such as article, input, and span ).
  2. The address can be specified by article, aside, nav, and section. Previously, it can only be applied to global ranges.
  3. Element B is now described as a text in a general article that only highlights the style and does not contain any additional importance. For example, keywords in the document summary and product names in the comments. Or the highlighted layout. In addition, according to HTML5 specifications, the title text should be
  4. Cite is used to indicate the introduction. The so-called Introduction refers to the reference of a book, a report, or other published source materials. You can use this label to define references, such as titles of books or magazines.
  5. The dl element is a group that contains multiple name-values. It is not just the original meaning of HTML4.
  6. The head element is no longer allowed to contain object child elements.
  7. The Theme Changes in the hr element definition content are displayed as a horizontal line, not just the meaning of the horizontal line.
  8. The I element is now described as highlighting different opinions or tone or other text in a common article, such as a classification name, a technical term, a slang in a foreign language, an idea, and so on. Or the Italic layout.
  9. Label element, the browser no longer moves the focus from the label to the control, unless the underlying platform user interface is standardized.
  10. The menu element is redefined, which is more useful in toolbars and context menus.
  11. The content marked by the s element is no longer accurate and important, and is not recommended. We recommend that you use <del>.
  12. The small element presents the side note as a small text. The disclaimers, precautions, legal restrictions, or copyright statements are usually small text. Small texts are sometimes used for news sources and license requirements. For texts highlighted by em elements or marked by strong elements as important, the small element does not cancel or reduce the importance of these texts.
  13. Strong elements represent important texts, instead of emphasizing texts with heavier tone.
  14. The u element represents an underscore. The content is a vague text, a text that is incorrect but still needs to be displayed, or a special term (such as a Chinese Word ).

 

Changed attributes)
  • The value Attribute of the li element is re-enabled, which is limited in 4.0. However, this attribute is re-used in HTML5, And the ol start attribute is also re-enabled. Note: The value is only the index value, not the sort value.

For example:

<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 lang="sh">Црна мачка, бели мачор</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>

 

The above code can also be implemented using the reversed attribute of the ol element:

<figure> <figcaption>The top 10 movies of all time</figcaption> <ol reversed>  <li><cite>Josie and the Pussycats</cite>, 2001</li>  <li><cite lang="sh">Црна мачка, бели мачор</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>

 

  • The target attribute of the and area elements is re-enabled because it is very useful in web programs, such as using iframe together.
  • The type attribute of the script and style elements is not mandatory. If the script conforms to ECMAScript, or the style language is CSS.
  • The border attribute value of the table element. It can only be set to "1" or an empty string.
  • Some of the following attributes are still available, but we recommend that you use a better alternative:
  • When using the language attribute of a script element, it must be set to "JavaScript" (case-insensitive) and cannot conflict with the type attribute. You can ignore this attribute.
  • The name attribute of Element a. You can use id instead.
  • The width and height attributes of the img element and all other elements do not allow you to set the value to a percentage number.

 

Copyright statement: This article is the original author of the http://www.zuiniusn.com, not allowed by the blogger can not be reproduced.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.