HTML5! Juvenile, HTML5! Juvenile

Source: Internet
Author: User

HTML5! Juvenile, HTML5! Juvenile

 

1. To enable IE9 or lower ie browsers to support html5 labels, you must first introduce the famous code using the conditional annotation method in the document header.
 
 
123 <!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

This piece of code is actually not mysterious, and very short. It just utilizes a strange feature of IE. If you are interested, you can download it and open it.

2. Change the document type declaration to <! Doctype html>. It seems that we are definitely more willing to do this, because the HTML 5 Document Type Declaration is simpler and clearer than the HTML 4 Statement.

3. Use a more concise document encoding statement, such as <meta charset = "UTF-8"> to replace the previous <meta http-equiv... This form.

4. directly use the <script> and <style> labels without defining their types, because the default values of the browser are what we need.

5. Use more semantic tags, such as

6. Adding quotation marks to the attribute values in a tag is not required. For example, <section class = "content"> </section> is completely correct.

Obviously, the above is just a bit of html5, but it just makes our web pages touch html5. To feel the real magic of html5, you have to study it in depth.

Related Article

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.