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.