您好,欢迎访问一九零五行业门户网

关于HTML头部的详细介绍

html <head> 元素
<head> 元素包含了所有的头部标签元素。在 <head>元素中你可以插入脚本(scripts), 样式文件(css),及各种meta信息。
可以添加在头部区域的元素标签为: <title>, <style>, <meta>, <link>, <script>, <noscript>, and <base>.
html <title> 元素 <title> 标签定义了不同文档的标题。
<title> 在 html/xhtml 文档中是必须的。
<title> 元素:
定义了浏览器工具栏的标题
当网页添加到收藏夹时,显示在收藏夹中的标题
显示在搜索引擎结果页面的标题
一个简单的 html 文档:
<!doctype html>
<html>
<head>
<title>title of the document</title>
</head>
<body>
the content of the document......
</body>
</html>
html <base> 元素 <base> 标签描述了基本的链接地址/链接目标,该标签作为html文档中所有的链接标签的默认链接:
<head>
<base href="http://www.52bcx.com/images/" target="_blank">
</head>
html <link> 元素 <link> 标签定义了文档与外部资源之间的关系。
<link> 标签通常用于链接到样式表:
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
html <style> 元素 <style> 标签定义了html文档的样式文件引用地址.
在<style> 元素中你需要指定样式文件来渲染html文档:
<head>
<style type="text/css">
body {background-color:yellow}
p {color:blue}
</style>
</head>
html <meta> 元素 meta标签描述了一些基本的元数据。
<meta> 标签提供了元数据.元数据也不显示在页面上,但会被浏览器解析。
meta元素通常用于指定网页的描述,关键词,文件的最后修改时间,作者,和其他元数据。
元数据可以使用浏览器(如何显示内容或重新加载页面),搜索引擎(关键词),或其他web服务。
<meta>一般放置于 <head>区域
<meta> 标签- 使用实例 为搜索引擎定义关键词:
<meta name="keywords" content="html, css, xml, xhtml, javascript">
为网页定义描述内容:
<meta name="description" content="free web tutorials on html and css">
定义网页作者:
<meta name="author" content="hege refsnes">
每30秒中刷新当前页面:
<meta http-equiv="refresh" content="30">
html <script> 元素 <script>标签用于加载脚本文件,如: javascript。
<script> 元素在以下章节会详细描述。
html head 元素 标签 描述
<head> 定义了文档的信息
<title> 定义了文档的标题
<base> 定义了页面链接标签的默认链接地址
<link> 定义了一个文档和外部资源之间的关系
<meta> 定义了html文档中的元数据
<script> 定义了客户端的脚本文件
<style> 定义了html文档的样式文件
以上就是关于html头部的详细介绍的详细内容。
其它类似信息

推荐信息