App下載

HTML頁面中的head頭部區(qū)域的編碼書寫規(guī)范

猿友 2021-01-18 18:58:00 瀏覽數(shù) (3966)
反饋

我們這里所說的head區(qū)域,是指網(wǎng)頁html代碼的<head></head>之間的內(nèi)容。在w3cschool.cn的文章中,主要介紹了大量的csshtml 入門知識,及其他前后端、Python 等編程技術教程。

今天我們簡單的介紹一下head區(qū)域主要放置了哪些內(nèi)容。這里就不強調(diào)css和javascript 了,這兩者大家應該都有所了解了,如有不明白可在編程獅w3cschool查閱相關教程。

head區(qū)一般必須加入的標識有:

公司版權注釋

<!--- the site is designed by W3Cschool 01/2021 ---> 

網(wǎng)頁顯示字符集

簡體中文:

<meta http-equiv="content-type" content="text/html; charset=gb2312">

繁體中文:

<meta http-equiv="content-type" content="text/html; charset=big5">

英 語:

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
或者:
<meta http-equiv="content-type" content="text/html; charset=utf-8">

原始制作者信息

<meta name="author" content="52css@w3cschool.cn"> 

網(wǎng)站簡介

<meta name="description" content="這里填您網(wǎng)站的簡介"> 

搜索關鍵字

<meta name="keywords" content="關鍵字1,關鍵字2,關鍵字3,..."> 

網(wǎng)頁的css規(guī)范

<link href="style/style.css" rel="stylesheet" type="text/css"> 

網(wǎng)頁標題

<title>這里是你的網(wǎng)頁標題</title> 

head區(qū)可選加入的標識有:

<!--- 設定網(wǎng)頁的到期時間。一旦網(wǎng)頁過期,必須到服務器上重新調(diào)閱。 ---> 
<meta http-equiv="expires" content="wed, 26 feb 2058 08:21:57 gmt"> 


<!--- 禁止瀏覽器從本地機的緩存中調(diào)閱頁面內(nèi)容。 ---> 
<meta http-equiv="pragma" content="no-cache"> 


<!--- 用來防止別人在框架里調(diào)用你的頁面。 ---> 
<meta http-equiv="window-target" content="_top"> 


<!--- 自動跳轉(5指時間停留5秒)。 ---> 
<meta http-equiv="refresh" content="5;url=www.o2fo.com">


<!--- 網(wǎng)頁搜索機器人向導.用來告訴搜索機器人哪些頁面需要索引,哪些頁面不需要索引。 ---> 
<meta name="robots" content="none">
<!--- content的參數(shù)有all,none,index,noindex,follow,nofollow。默認是all。  ---> 


<!--- 收藏夾圖標 ---> 
<link rel = "shortcut icon" href="favicon.ico"> 

以上就是編程獅(w3cschool.cn)為你整理的關于HTML頁面中的head頭部區(qū)域的編碼書寫規(guī)范,希望對你有所幫助~

2 人點贊