<head> 元素是所有头部元素的容器。
<head> 内的元素可包含脚本,指示浏览器在何处可以找到样式表,提供元信息,等等。
<head> 中可以添加 <title>、<base>、<link>、<meta>、<script> 以及 <style> 等标签。
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>
<head> <base href="http://www.hulumiao.cn/" /> <base target="_blank" /> </head>
<head> <link rel="stylesheet" type="text/css" href="mystyle.css" /> </head>
<head> <style type="text/css"> body {background-color:yellow} p {color:blue} </style> </head>
<meta name="description" content="Free Web tutorials on HTML, CSS, XML" /> <meta name="keywords" content="HTML, CSS, XML" />注释:name 和 content 属性的作用是描述页面的内容。
评论