当前位置: 首页 > 文档资料 > HTML 入门教程 >

<meta>

优质
小牛编辑
110浏览
2023-12-01

Function

HTML 标记用于声明HTML文档的元数据。

HTML和XHTML之间的区别

在HTML中,标记没有结束标记。

在XHTML中,必须正确关闭标记。

例子 (Example)

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

有关Meta Tag的更多详细信息,请访问Meta Tag

属性 (Attributes)

属性描述
Nameauthor description keywords generator revised othersName for the property.
contenttext定义与http-equiv或name关联的元信息。
http-equivcontent-type expires refresh set-cookie将content属性连接到HTTP标头。
schemetext定义用于解释content属性值的格式。

标准属性

Sr.No属性和描述
1dir

指定文本的方向

2lang

设置语言代码。

3

xml:lang

设置语言代码。