Home > Web Front-end > HTML Tutorial > What are the basic structures of HTML?

What are the basic structures of HTML?

php中世界最好的语言
Release: 2018-01-22 10:48:25
Original
2764 people have browsed it

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.

Introduction to HTML

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>
Copy after login

HTML tags of standard web pages

1.HTML documentDeclaration:

2.Page title :~

3. Page encoding:

utf-8 is a multi-language encoding (recommended Use)

gb2312 is the simplified Chinese encoding


4. Page keywords:

Main content of the page:

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>
Copy after login

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template