HTML文件基本標記(一)-、、

關於HTML文件head、title、meta標記的使用

<!DOCTYPE html>
<html>
<head>
<!-- HTML使用http-equiv來設置標頭屬性名稱;使用charset來設置網頁的內碼語系 -->
<meta charset="UTF-8">
<!--HTML使用name定義keyword來設置網頁的關鍵字屬性  -->
<meta name="keyword" content="html,基本標記">
<!-- HTML使用name定義description來設置網頁的信息描述 -->
<meta name="description" content="關於HTML文件的基本標記">
<!-- HTML使用name定義generator來設置網頁的編輯軟件名稱 -->
<meta name="generator" content="eclipse">
<!-- HTML使用name定義author來設置網頁的作者信息 -->
<meta name="author" content="劉昕">
<!-- HTML使用name定義robots來限制網頁的搜索方式 -->
<!-- All:表示能搜索當前網頁及其鏈接的網頁 -->
<!-- Index:表示能搜索當前網頁 -->
<!-- Nofollow:表示不能搜索當前網頁鏈接的網頁 -->
<!-- Noindex:表示不能搜索當前網頁 -->
<!-- None:表示不能搜索當前網頁及其鏈接的網頁 -->
<meta name="robots" content="Index">
<!-- HTML使用http-equiv來定義refresh來設置網頁的跳轉時間;content中設置時間(秒)與跳轉鏈接 -->
<meta http-equiv="refresh" content="3;url=https://www.baidu.com">
<!-- HTML使用http-equiv來定義expires來設置網頁的有效期限;content中設置時間(GMT格式:星期,日   月   年   時   分   秒) -->
<meta http-equiv="expiresh"
    content="Thurs,31 December 2099 23:59:59 GMT">
<!-- HTML使用http-equiv來定義cache-control/pragma來設置網頁緩存屬性;content使用no-cache來設定禁止從緩存中調用 -->
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<!-- HTML使用http-equin來定義set-cookie來設置網頁刪除過期的cookie;content中爲網頁過期的時間,若網頁過期則刪除存盤的cookie -->
<meta http-equiv="set-cookie"
    content="Thurs,31 December 2099 23:59:59 GMT">
<!-- HTML使用http-equiv來定義windows-target來設置網頁的打開方式;content使用_top設置爲打開的是一個獨立頁面 -->
<!-- 該meta可以防止自己的頁面被別人當作一個frame頁調用 -->
<meta http-equiv="windows-target" content="_top">
<title>HTML文件的基本標記</title>
</head>
<body>
    <h1 style="text-align: center;">頭部標記</h1>
    <p align="center">
        base:當前文檔的URL全稱(基底網址);<br />
    </p>
    <p align="center">
        basefont:設定基準的文字字體、字號和顏色;<br />
    </p>
    <p align="center">
        title:設定顯示在瀏覽器左上方的標題內容;<br />
    </p>
    <p align="center">
        isindex:表明該文檔是一個可以用於檢索的網關腳本,由服務器自動建立;<br />
    </p>
    <p align="center">
        meta:有關文檔本身的元信息,如用於查詢的關鍵字、獲取該文檔的有效期等;<br />
    </p>
    <p align="center">
        style:設定CSS層疊樣式表的內容;<br />
    </p>
    <p align="center">
        link:設定外部文件的連接;<br />
    </p>
    <p align="center">
        script:設定頁面中程序腳本的內容;<br />
    </p>
    <br />
    <br />
    <br />
    <h2 style="text-align: center; color: red;">
        <a
            href="file:\\\D:\eclipse\workspace\MyPage\HTML_BasicMarkup\ToBeContinue.html">下一頁</a>
    </h2>

</body>
</html>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章