首頁head區(qū)代碼規(guī)范

字號:


    必須加入的標(biāo)簽
    1.公司版權(quán)注釋
    <!---thesiteisdesignedbymaketown,inc06/2000--->
    2.網(wǎng)頁顯示字符集
    簡體中文:<metahttp-equiv=content-typecontent=text/html;charset=gb2312>
    繁體中文:<metahttp-equiv=content-typecontent=text/html;charset=big5>
    英語:<metahttp-equiv=content-typecontent=text/html;charset=iso-8859-1>
    3.網(wǎng)頁制作者信息
    <metaname=authorcontent=hhlong.com>
    4.網(wǎng)站簡介
    <metaname=descriptioncontent=xxxxxxxxxxxxxxxxxxxxxxxxxx>
    5.搜索關(guān)鍵字
    <metaname=keywordscontent=xxxx,xxxx,xxx,xxxxx,xxxx,>
    6.網(wǎng)頁的css規(guī)范
    <linkhref=style/style.cssrel=stylesheettype=text/css>
    7.網(wǎng)頁標(biāo)題
    <title>xxxxxxxxxxxxxxxxxx</title>
    可以選擇加入的標(biāo)簽
    1.設(shè)定網(wǎng)頁的到期時間。一旦網(wǎng)頁過期,必須到服務(wù)器上重新調(diào)閱。
    <metahttp-equiv=expirescontent=wed,26feb199708:21:57gmt>
    2.禁止瀏覽器從本地機的緩存中調(diào)閱頁面內(nèi)容。
    <metahttp-equiv=pragmacontent=no-cache>
    3.用來防止別人在框架里調(diào)用你的頁面。
    <metahttp-equiv=window-targetcontent=_top>
    4.自動跳轉(zhuǎn)。
    <metahttp-equiv=refreshcontent=5;url=http://www.hhlong.com>
    5指時間停留5秒。
    5.網(wǎng)頁搜索機器人向?qū)?。用來告訴搜索機器人哪些頁面需要索引,哪些頁面不需要索引。
    <metaname=robotscontent=none>
    content的參數(shù)有all,none,index,noindex,follow,nofollow。默認(rèn)是all。
    6.收藏夾圖標(biāo)
    <linkrel=shortcuticonhref=favicon.ico>
    所有的javascript的調(diào)用盡量采取外部調(diào)用。
    <scriptlanguage=javascriptsrc=script/xxxxx.js></script>
    附<body>標(biāo)簽:
    <body>標(biāo)簽不屬于head區(qū),這里強調(diào)一下,為了保證瀏覽器的兼容性,必須設(shè)置頁面背景<bodybgcolor=#ffffff>