Article introduction of Wulin.com (www.vevb.com): Comparing the specifications of XHTML 1.0 Transitional, html5 basically does not have the strict requirements of XHTML 1.0 Transitional, and simplifies a lot of things.
Comparing the specifications of XHTML 1.0 Transitional, html5 basically does not have the strict requirements of XHTML 1.0 Transitional, and simplifies a lot of things.
• Documentation declaration is simpler.
1 <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN >
2 <!--In HTML5, write this way:->
3 <!DOCTYPE html>
•The namespace is not required to be declared on the html tag.
1 <html xmlns= lang=zh-CN>
2 <!--In HTML5, write this way:->
3 <html lang=zh-CN>
•The character set encoding declaration is also simple
1 <meta http-equiv=Content-Type content=text/html; charset=UTF-8 />
2 <!--In HTML5, write this way:->
3 <meta charset=UTF-8 />
• You don't need to write type attributes to css and javascript code
1 <script type=text/javascript></script>
2 <style type=text/css></style>
3 <!--In HTML5, you can write directly:->
4 <script></script>
5 <style></style>
•No requirements for XHTML code specifications
All markers must have a corresponding end mark;
All tag elements and attribute names must be in lowercase;
All XML tags must be reasonably nested;
All attributes must be enclosed in quotes;
1 <div class=test></div>
2 <br>
3 <INPUT TYPE=TEXT />
4 <!--No strict requirements are made for these-->