Home > Article > Web Front-end > Introduction to the basic structure of HTML
A complete HTML document must contain 3 There are three parts: document declaration, document header and document body. It is these that constitute the skeleton structure of HTML. We have introduced the document declaration and document header respectively. This article will introduce in detail the basic elements that constitute the HTML skeleton structure.
HTML -The element represents the root of the HTML document, and all other elements are descendants of this element. The
tags define the start and end points of the document, and between them are the head and body of the document. The head of the document is represented by
headIntroduction to the basic structure of HTML. The Introduction to the basic structure of HTMLIntroduction to the basic structure of HTML> tag is defined, while the body is defined by the <a href="http://www.php.cn/html/html-HEAD-2.html" target="_blank"> tag</a>
The tag is used to define the head of the document, which is a container for all head elements;
is mostly invisible and describes the document. Some basic attributes and information (the ones that can be presented are title and icon). The sub-elements under the element mainly include
<meta>
, ,
<base>
, <link>
, <style></style>
and <script></script>
this The six elements
<title></title>
define the title of the document, which is the only required element in the head section
If omitted in the document tag, most browsers will automatically create a
element For more information about the document header, go here
BODY
elementIntroduction to the basic structure of HTML is allowed. Introduction to the basic structure of HTMLIntroduction to the basic structure of HTML【Default Style】
chrome/firefox/safari/IE8+ margin:8px; IE7- margin:15px 10px;
Structure
In the sublimeeditor
, enter !, and then hold down the Tab key to generate a basic HTML structure. The structure is as follows<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Document</title> <meta name="keywords" content=""/> <meta name="description" content=""/> <meta name="viewport" content="width=device-width"/> <link rel="stylesheet" href="5/style.css"/> <link rel="shortcut icon" href="ico.ico"/> </head> <body> </body> </html>
The above is the detailed content of Introduction to the basic structure of HTML. For more information, please follow other related articles on the PHP Chinese website!