規範 <head> 區結構,利於團隊協作、SEO 與瀏覽器相容。以下為企業級專案常用清單。
<!-- The site is designed by Company, YYYY/MM --><meta http-equiv="Content-Type" content="text/html; charset=utf-8">(HTML5 建議 <meta charset="utf-8">)<meta name="author" content="team-name"><meta name="description" content="..."><meta name="keywords" content="kw1,kw2,kw3"><link href="style/style.css" rel="stylesheet" type="text/css"><title>頁面標題</title><meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Window-target" content="_top"><meta http-equiv="Refresh" content="5; url=https://example.com"><meta name="robots" content="index,follow"><link rel="shortcut icon" href="favicon.ico"><script src="script/xxx.js"></script>
盡量放在 </body> 前,避免阻塞渲染。
<body bgcolor="#FFFFFF">
確保極舊瀏覽器也有白色背景,防止透明底顯示亂碼。