HTML <html> 标签

2025年3月25日 | 1 分钟阅读

The <html> tag represents the root of an HTML document, hence it is also called the root element. It is a container of all elements (except <!Doctype> ) such as <body>, <head> and each element which appears in an HTML document. It tells the browser that the document is an HTML document.

Before the <html> tag, we can only use the <!Doctype> declaration, which gives information about the HTML version to the browser.

语法

Following are some specifications about the HTML <html> tag

显示
开始标签/结束标签开始和结束标签均有
用途结构型

示例 1

输出

HTML html tag

属性

属性描述
xmlnshttp://www.w3.org/1999/xhtmlIt specifies the XML namespace for the document (Not required)
manifestURLIt specifies the URL of the resource manifest indicating resources that should be cached locally.

全局属性

The <html> tag supports global attributes in HTML.

事件属性

The <html> tag supports event attributes in HTML.

支持的浏览器

元素chrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<html>是的是的是的是的是的
下一主题HTML I 标签