Html document structure

A simple html document structure example

<!DOCTYPE html>
<!-- add other tag or content here! -->
<meta charset="utf-8">
<title>html title</title>
<!-- add other tag or content here! -->
<h1>hello html,i am a h1 tag(hl tag)</h1>
<p>hello html, i am a paragraph(p tag)</p>


From the above we can see that an html document is composed of html tags and the contents populated in them. The first line of <!DOCTYPE html> is a declaration (DOCTYPE is not a label), telling the browser that this is an html (h5 standard) document. The browser parses the document according to the standard of the html document and renders it to the page for display. The

<html></html> tag pair contains all the other html tags, and the entire <html></html> tag pair is divided into two most <head></head> tag pairs and < The body></body> tag pair, which is the head and body of the web page (html document), <head></head> contains the metadata information of the html document (for example: the encoding method, title, base station address, etc. of the html document) Some information related to the html document), the content of the <head></head> tag will not be rendered to the html page; the content of the <body></body> tag pair will be viewed by the browser. The rendering is displayed on the page. The content of the body in the above example shows the content of a title and a paragraph: