在HTML5中,DOCTYPE和字符集声明简化了许多!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>测试h5</title>
</head>
<body>
</body>
</html>
项目目录结构
│ test_h5.html
│
├─css
│ h5.css
│
├─img
└─js
h5.js
html中添加外部引用
<link rel="stylesheet" type="text/css" href="css/h5.css">
<script type="text/javascript" src="js/h5.js"></script>