In the previous section, we introduced the new features of HTML5, the use of new tags, intelligent form design, the introduction of multimedia objects, Canvas objects for your canvas, extended graphic tags, geographical applications in HTML5, independent data storage, and new network connections.
HTML 5 is the biggest leap forward in web development standards in the past decade. Unlike previous versions, HTML 5 is not just used to represent Web content. Its new mission is to bring the Web into a mature application platform. On the HTML 5 platform, video, audio, images, animations, and computer-based Interactions are standardized. (HTML5 also has its own logo). Learning Html5 requires mastering the following aspects of knowledge.
1. HTML basic knowledge
2. CSS style knowledge
3. JavaScript knowledge
Many friends who have learned HTML 4.0 before may now understand I feel very confused. What is the difference between HTML 4.0 and HTML5? How will learning HTML4.0 help learning HTML5? In fact, the biggest difference between HTML5 and HTML4 is that HTML5 pays more attention to content and structure rather than performance. For example:
<body> <header> <hgroup>导航相关数据</hgroup> </header> <nav>菜单</nav> <article> <h1>标题:HTML5专题</h1> 发布日期:<time>19:00</time> <time datetime="2013-2-14">情人节</time> <p>测试相关内容</p> </article> <footer> <address>CSDN-大碗干拌的博客</address> </footer> </body>
Like the above many tags in html5, we can use the
Another difference is that HTML5 has simplified more declarations and tags, also made detailed provisions on compatibility, abolished some elements, and added Some elements, such as the following declaration:
HTML4 declaration:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitonal//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-t...... <html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
HTML5 declaration:
<!DOCTYPE html> <meta charset=utf-8/>
When introducing JavaScript or CSS files, in HTML4 The writing method is as follows:
<script src="js/juery-1.6.2.js" type="text/javascript"></script>
It becomes simpler in HTML5:
<script src="js/juery-1.6.2.js"></script>
Not only that, HTML5 accepts some looser syntax, such as