Home > Article > Web Front-end > What are the basic structures of HTML?
This time I will bring you what are the basic structures of HTML, and what are the precautions when designing the basic structure of HTML. The following is a practical case, let's take a look.
HyperText Markup Language: Hypertext Markup Language
HyperText: Hypertext (text + picture + video + audio + link)
Markup Language: Markup Language
Three major elements of the website
Pictures, Hyperlinks, Text
HTML basic structure
<html> <head> <title>Document</title> </head> <body> I am mossbaoo ! </body> </html>
HTML tags of standard web pages
1.HTML documentDeclaration: fef50554eca1a427827adaa329da8122
2.Page title :b2386ffb911b14667cb8f0f91ea547a7~6e916e0f7d1e588d4f442bf645aedb2f
3. Page encoding: 9eb7f0676c6b164d9cd2d3b69d5c092c
utf-8 is a multi-language encoding (recommended Use)
gb2312 is the simplified Chinese encoding
4. Page keywords: 32d9e2e7b02cc199b674abb6b4ca1a12
Main content of the page: acb56b1fc9121ac8f6085dc03b2a5e2e
Note: The meta tag is an auxiliary tag in the HTML language, usually used Optimized for search engines, it is located at the head of the HTML document.
Generate the initial structure of the HTML document
1. The standard structure of HTML5: html:5+Tab key or !+Tab key
The generated result is as follows
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> </body> </html>
2. Transitional structure of HTML4: html:xt+Tab key
The generated result is as follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Document</title> </head> <body> </body> </html>
Notes on HTML tags:
• HTML element consists of a start tag and an end tag.
• The text located in the opening and closing tags is the content of the element.
• HTML tags must have a beginning and an end. If it is a tag with no content (empty tag), use /> to end it.
• Tag names are not case-sensitive, but in XHTML tag names must be lowercase.
• Tags have attributes, which are used to represent the nature and characteristics of the tag. Attributes are specified in the opening tag.
I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
Detailed explanation of examples of HTML text formatting
Summary of frequently used tags in html
The basics of HTML editing (a must-read for beginners)
The above is the detailed content of What are the basic structures of HTML?. For more information, please follow other related articles on the PHP Chinese website!