HTML document structure

HTML document structure

Using HTML elements alone is meaningless, they need to be combined to form a complete web interface.
insert image description here
<!DOCTYPE html >:It is the documentation statement. No need to memorize this line of code, and no need to struggle with its meaning. When it appears, just know it's a one-line description of the doctype.
<html></html>: <html>element is the root element of the entire complete page.
The document structure of HTML includes two parts: <head>the head and <body>the body of the web page.
(1) <head>The head
<head></head>:<head>element is a container. It contains the header information of all HTML pages. Users may not necessarily see all of this information. This information includes search keywords, page descriptions, CSS styles, etc.
<title></title>:<title>element is used to set the page title. It appears on browser tabs and is used to describe pages when your browser marks or bookmarks them.
(2) <body>The main
<body></body>:<body>element contains all the content displayed on the page when visiting the page: text, pictures, audio, video, animation, etc. <h>Elements, <p>elements, and <img>elements can be nested within <body>elements to form the main content of a web page.

Guess you like

Origin blog.csdn.net/blbyu/article/details/129483838