HTML Tag HTML 标签

The HTML tag <html> represents the root (start) of an HTML document. It is the container that all other HTML elements are placed.

HTML标签 <html> 表示HTML文档的根(开始)。它是放置所有HTML元素的容器。

Note: that the <html> tag does not contain the <!doctype> declaration. This is because the document type declaration needs to be the very first element of code in a website; furthermore, the declaration is also not an HTML element. Therefore it cannot be inclosed between the <html> tags with other HTML elements. 

注意:<html>标签不包含<!doctype>声明。这是因为文档类型声明必须是网站中代码的第一个元素;此外,声明也不是HTML元素。因此,它不能与其他html元素一起包含在标签里。

Syntax 语法:

The HTML tag is written as <html>  </html> with all other HTML elements enclosed between the start and end tags. The HTML tag <html> is the first HTML element in an HTML document, and is only preceded by the document type declaration.

HTML标签写为<html>  </html>,所有其他HTML元素都包含在开始标签和结束标签之间。HTML标签是HTML文档中的第一个HTML元素,前面只有文档类型声明。

The very first tag within the HTML tag <html> should always be the head tag <head> tag which is then followed by a body tag <body>.  Although a website can function without a head tag, it is an important part of any properly formatted website.

HTML标签中的第一个标签应该始终是<head>标签,然后是<body>标签。虽然一个网站可以在没有标题标签的情况下运行,但它是任何格式正确的网站的重要组成部分。

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.

Proceed to the next example: Head Tag