首先,我先講明head標簽常見內容
<head>
<title>...</title>
<link>
<style>...</style>
<script>...</script>
<meta>
</head>
其次各標簽不同用法
1.title用于顯示網頁的標題信息
<title>sunyifan</title>
顯示網頁上部標題
2.link鏈接一個外部樣式表:通過外部樣式改變html元素樣式
eg:
<head>
<link rel="stylesheet" type="text/css" href="theme.css" />
</head>
3.style用于包含一些css樣式代碼
4.script則是用來插入javascript代碼
5.meta元素可提供有關頁面的元信息
eg:
<meta name="keywords" content="HTML,ASP,PHP,SQL">
name 屬性對于進入搜索引擎的索引有幫助
<meta http-equiv="charset" content="iso-8859-1">
瀏覽器可以接受這些附加的頭部字段,并能以適當的方式使用它們