Illustration of HTML document structure
This article mainly shares with you an illustration of the document structure of HTML. It has a good reference value and I hope it will be helpful to everyone. Let’s follow the editor to have a look.
The structure of the HTML document can be understood as the grammatical structure of the web page, an encoding format. This document structure can make the writing of web pages very standardized. Standardized code can increase code readability and make it look more professional.
HTML documents always start with the tag and end with . In other words, all the content of the web page is contained between and . The currently known HTML document structure is as follows:
<html>......</html>
All HTML files have two main structures: head and body. Usually the description information of the document is placed in the head, and the subject information of the document (the information displayed on the browser) is placed in the body part. The first update of the HTML document structure is:
<html> <head> ...... </head> <body> ...... </body></html>
The title is the most important information in the head of the HTML document. Each document should have a title, which allows visitors to know what the main content of the webpage is when they see the title of the webpage. So where does the title appear on the web page? Take Baidu's homepage as an example:
As you can see from the picture above, the title of Baidu's homepage is "Baidu, you are the way"
The document title is placed Between < title> and < /title> at the head of the document. Its structure is as follows:
<head> <title>文档标题</title></head>
The main part of the HTML document contains the text, images, hyperlinks, etc. that are displayed on the web page. In the main part of the document, you mainly write what you want to give to the user. View, or what the user wants to see. The body section begins with the < body> tag and ends with < /body>. Its structure is as follows:
<body> 文档主要内容:文本、图像、音频、视频、超链接等。</body>
Use < !DOCTYPE> to describe the document type to help the browser display the web page correctly There are many types of documents in the web world, and the browser can only clarify The type of document can display the document more accurately. Therefore, we should add < !DOCTYPE> to each document to describe the document type. < !DOCTYPE> precedes the < html> tag.
In HTML4.01, the document type declaration is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
In HTML5, the document type declaration is very simple:
<!DOCTYPE html>
When programming, it is often necessary to add comments to keep your logic clear and increase the readability of the code. The method of adding comments in HTML documents is:
<!--注释内容-->
When the browser reads the HTML document, it automatically ignores the content of the comments. In other words, the content of the annotation will not be displayed on the browser.
Finally, the complete structure of the online HTML document:
<!DOCTYPE html>文档标题 ...... 文档主要内容:文本、图像、音频、视频、超链接等。
Related recommendations:
HTML5 document structure Analysis
HTML5: Organization document structure
The above is the detailed content of Illustration of HTML document structure. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.
