Head Tag 头部标签

The head tag <head> represents the document head, or the initial HTML element, of an HTML document. The head tag <head> contains other HTML tags that contain metadata, styles, and other HTML elements which are important elements in a well structured website; however these elements are not part of the visible design of the webpage. Metadata is added to the document head <head> to provide information about the document such as: a title, description, search keywords etc. A typical HTML document could contain a title tag <title> tag, and one or more meta tags <meta>, a script tag <script>, and a style tag <style>, which are enclosed within the head tag <head> element.

<head>标签表示HTML文档的文档头或初始HTML元素。<head>标签包含其他HTML标签,这些标签包含元数据、样式和其他HTML元素,这些元素是结构良好的网站中的重要元素;然而,这些元素不是网页可见设计的一部分。元数据被添加到文档头,以提供有关文档的信息,例如:标题、描述、搜索关键字等。典型的HTML文档可能包含<title> 标签,以及一个或多个<meta>元标签、<script>脚本标签和<style>样式标签,它们都包含在<head> 标签元素中。

Note: Most metadata is not displayed in the browser, although the title <title> will usually appear in the browser’s title bar. The main purpose of information in the Head Tag <head> is to improve the functionality of the page.

注意:大多数元数据不会显示在浏览器中,尽管标题通常会显示在浏览器的标题栏中。<Head>标签中信息的主要目的是改进页面的功能。

Syntax 语法:

The head tag <head> tag is written as <head>   </head> with the metadata content enclosed between the start and end tags. The head tag <head> tag is placed between the opening and closing HTML tags <html> tags.

head标签写为元数据内容包含在开始标签和结束标签之间。 <head> 标签位于开始和结束<html>标签之间。

Most HTML documents will have a title tag <title> within the head tag <head>.

大多数HTML文档在<head>标签中都有一个<title>标签。

Example例:

pastedGraphic.png
Instructions: Retype this code in an HTML editor and then load the webpage in a browser of your choice. Then once you have loaded the page try experimenting with the code. Making a few small changes and then preview how those changes affected your webpage. Once you are comfortable with this HTML Tag you should proceed to the next example.
说明:在HTML编辑器中重新键入此代码,然后在选择的浏览器中加载网页。加载页面后,尝试使用代码进行实验。进行一些小的更改,然后预览这些更改如何影响网页。一旦熟悉了这个HTML标签,就继续下一个示例。

Proceed to the next example: Body Tag