HTML5和HTML4之间的区别
1、HTML头部
(1)HTML5:
<!doctype html>
(2)HTML4:
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN”
“http://www.w3.org/TR/html4/strict.dtd”>
2、HTML编码
(1)HTML5:
<meta charset=“utf-8”>
(2)HTML4:
<meta http-equiv=”content-type”content=”text/html;charset=UTF-8”>
3、引入CSS样式文件
(1)HTML5:
<link rel=”stylesheet” href=”demo.css”>
(2)HTML4:
<link type=”text/css” rel=”stylesheet” href="demo.css”>
4、引入JS文件
(1)HTML5:
<script src=”demo.js”></script>
(2)HTML4:
<script type=”text/javascrpt” src="demo.js”></script>