Home > Web Front-end > HTML Tutorial > Basic structure of html document (basic knowledge of web page production)_HTML/Xhtml_web page production

Basic structure of html document (basic knowledge of web page production)_HTML/Xhtml_web page production

WBOY
Release: 2016-05-16 16:38:15
Original
1303 people have browsed it

How HTML works:

1. Run locally: open the html file with a browser

2. Remote access operation: local browser accesses remote server (tomcal)

It is best not to have Chinese characters in the file name of the webpage, because in the future webpage files will be saved on the server. It is recommended to use English when saving HTML files. You can use either .htm or .html file suffix.

2. Basic structure of HTML document

1. The skeleton of the document: All web files usually consist of the following four pairs of tags to form the skeleton of the document


Copy code
The code is as follows:


< head>
Web page title</title<br /></head></p> <p><body><br>Here is the content to be displayed on the web page<br></body><br></html><br> </div> <br><html> ;....</html>: Marks the beginning and end of the web page. All html elements must be placed in this pair of tags <br><head>....</head>: Marks the web page file The header information, such as title, search engine keywords, etc. The content inside is loaded first <br><title>....: identifies the title of the web page file
. ...: identifies the main part of the web page file, that is, the visible content of the page

2. meta tag

meta tag is used to define file information and describe web pages to facilitate search engines. It should be placed between

Set keywords: (relatively short, used for search engines)
value indicates the keyword to be set, and is used between multiple keywords , separated by
Set description: (used to expand keywords, or provide an overview of the content of the web page)
value Indicates the description to be set. Multiple descriptions are separated by,
Set the author:
The author name is usually the company name
Set the encoding of the web page:

Set the page timing jump:
(content="2;url=http://www.baidu.com" 2 means How many seconds will it take for this webpage to jump to the destination specified by url)

Describe the version of the web page:

You can set other web page information:

Describe the software through which the web page is generated:


Copy code
The code is as follows:

http://www.w3 .org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
http://www.w3.org/1999/xhtml">







Basic structure of HTML document _meta tag


meta tag is used to define file information and describe web pages to facilitate search engine searches,


3. Head area

Copy the code
The code is as follows:


Web page titleFile title statement
Some document information, such as the document keywords, description, character set Settings and more.
Hyperlink URL base reference point
JavaScript and VBScript programs
stylesheet can be used to set layout declarations
can reference external files, such as CSS layout samples

3. Syntax of HTML tags

The most basic syntax of HTML is Content. Markers are usually used in pairs with an opening tag and an ending tag. There is also a single tag without an ending tag. Such as


HTML tag types: single tag and double tag
Double tag:
With attributes: ... For example: < font size="3">....
No attribute: ... For example: .... .

Single tag:
With attributes: For example:


(the default is centered)
Without attributes: < ;Mark name> For example:


Copy code
The code is as follows:


2. The physical education teacher said: Whoever dares to wear a skirt in my class will be punished by making her stand on her head!

< /p>



3. Live in my heart, have you paid the rent?
4. You made it impossible for me to get off the stage, and I made it impossible for you to even get on stage

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