html5頁面常用的程式碼
阿新 • • 發佈:2018-12-23
HTML5頁面程式碼結構
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<!--控制 快取-->
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<!--移動頁面-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title>標題</title>
<meta name="Keywords" content="csdn,艾斯博弈,我愛聽寶奧" />
<meta name="Description" content="這是一個標準html5的demo頁面" />
<link href="../xxx.css" type="text/css" />
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="http://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style type="text/css"></style>
</head>
<body>
<header>
<!-- 頭部 -->
<nav>
<ul>
<li></li>
</ul>
</nav>
</header>
<div class="container">
<!-- 主體 -->
<section>
</section>
<article>
<aside>
</aside>
</article>
</div>
<footer>
<!-- 底部 -->
</footer>
<script type="text/javascript"></script>
</body>
</html>
如有新的,後續補充
上面的是一個HTML5的基本結構,今天發現一個更好的,據介紹有上百人的經驗集合。
那就是
HTML5 Boilerplate
https://html5boilerplate.com/