首頁  >  文章  >  web前端  >  在HTML文件中包含元數據

在HTML文件中包含元數據

PHPz
PHPz轉載
2023-08-19 15:57:13731瀏覽

在HTML文件中包含元數據

HTML 標籤用於宣告HTML文件的元資料。以下是屬性:

##描述#Name#author#屬性的名稱。 content#文字定義與http-equiv或name關聯的元資訊。 http-equiv#content-type將content屬性連接到HTTP頭。 scheme#文字定義用於解釋content屬性值的格式。
屬性

#值

description

keywords

generator

revised

others

expires

refresh

set-cookie

範例

您可以嘗試執行以下程式碼來包含元資料:

<html>
   <head>
      <title>HTML meta tag</title>
      <meta name = "keywords" content = "HTML, meta tag, metadata" />
      <meta name = "description" content = "Description of the document" />
      <meta http-equiv = "refresh" content = "10" />
   </head>
   <body style = "background-color:gray">
      Document content goes here
   </body>
</html>

以上是在HTML文件中包含元數據的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文轉載於:tutorialspoint.com。如有侵權,請聯絡admin@php.cn刪除