Compared with the specification of XHTML 1.0 Transitional, html5 basically does not have the strict requirements of XHTML 1.0 Transitional, and simplifies a lot of things.
1. Document declaration is simpler:
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
<!--In HTML5, write this:->
<!DOCTYPE html>
2. The namespace is not required to be declared on the html tag.
<html xmlns=http://www.w3.org/1999/xhtml lang=zh-CN>
<!--In HTML5, write this:->
<html lang=zh-CN>
3. The character set encoding declaration is also simple.
<meta http-equiv=Content-Type content=text/html; charset=UTF-8 />
<!--In HTML5, write this:->
<meta charset=UTF-8 />
4. You don’t need to write type attributes to the css and javascript code.
<script type=text/javascript></script>
<style type=text/css></style>
<!--In HTML5, you can write directly:->
<script></script>
<style></style>
5. There is no requirement 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;
<p class=test></p>
<br>
<INPUT TYPE=TEXT />
<!--No strict requirements are made for these-->