The basic HTML syntax makes it easy for users who are new to learning html. Many users who are new to getting started with and want to learn how to create web pages can read it.
1.1 General Mark
Generally, a Tag is composed of an Opening Tag and an Ending Tag. The syntax is as follows: Controlled text
X indicates the tag name. And Like the same group of switches: Start mark End the flag to enable a function of (ON ). (Usually add a slash/to the Start mark) as the OFF function, and the controlled text information is placed between the two marks. For example:
This is Italic
Some attributes can be added to the tag to complete some special effects or functions. For example: Controlled text
Among them, a1, a2 ,..., an is the attribute name, while v1, v2 ,..., vn is the property value corresponding to it. The attribute value is not enclosed by quotation marks and is accepted by the browser currently. However, according to the W3C standard, the attribute value must be enclosed by quotation marks, so it is best to get used to quotation marks.
1.2 empty tag
Although most tags appear in pairs, some of them exist independently. These independent Tags are called Empty Tags (Empty Tags ). The method is as follows:
Similarly, empty tags can be appended with certain attributes to accomplish certain special effects or functions. For example: For example :,
The new W3C standard (XHTML1.0/HTML4.0) is recommended that the null Mark end with a slash (/), that is:
If an additional property is:
Currently, the browser does not have strict requirements on whether to add/after the empty tag, that is, adding/at the end of the empty tag does not affect its function. But if you want your files to meet the latest standards, you 'd better add /.
2. HTML tag Classification
2.1 Document Structure Tags)
The purpose of this type of tag is to mark the structure of the file, mainly including:
...: Indicates the start and end of an html file.
...: Indicates the file title area.
...: Mark the file subject area
Block Formatting Tags)
The main purpose of this type of tag is to display a text segment in an HTML file in a specific format to increase the readability of the file. Mainly include:
...: File Question.
... : I = 1, 2,..., 6, webpage title.
: Generate a horizontal line.
: Force line feed.
: File section.
: Displayed in the original format.
...: Indicates the contact name, phone number, address, and other information.
: Block reference tag.
Character Formatting Tags)
It is used to change the appearance of HTML files and increase the appearance of files. Mainly include:
...: Change the font settings.
... : Center alignment.
... : Text flashing.
...: Increase the font size.
: Reduce the font size.
2.4 List Tags)
: No ID list.
- ...: List items.
: Definition list.
: Define a project.
: Define a project.
... : Directory list.
... : Menu type list.
2.5 link Tag (Anchor Tag)
Links are the lifeblood of html Hypertext files. html uses link tags to integrate information such as graphs, texts, shadows, and audios distributed around the world. These tags are mainly used to mark Hypertext links. They mainly include:
...: Create a hyperlink.
2.6 Multimedia Tag)
These tags are used to display image data. Mainly include:
: Embed an image.
: Embed a multimedia object.
: Background music.
2.7 Table Tags)
This type of tag is used to create a table. Mainly include:
: Defines the table section.
...: Table title.
...: Table column.
...: Table cell.
2.8 Form Tags)
These tags are used to create interactive forms, mainly including:
: Indicates the start and end of the form section.
: Generate single-line text boxes, single-choice buttons, and check boxes.
...: Generate multi-line Input text box.
...: Indicates the start and end of the drop-down list.
...: A selection item is generated in the drop-down list.
HTML tags are not case sensitive, that isAndIs the same. These tags are described as follows.
3. File structure mark
The structure of an html file can be divided into two parts: the header Section and the Body Section ). The file structure mark is used to indicate where the title belongs and where the subject belongs.
3.1: Indicates the entire file
Purpose: Mark the entire html file
Note: a standard html file is an articleStartingEnd file. That is:
Full text of... html file
3.2: Indicates the file title area.
Note: In html filesAndThe folder is called the file title area. Generally, the head section is included in the html section, that is:
... Html file title Area
3.3: Webpage title </strong> <br/> <title> .....It is the most important and commonly used tag in the html file title area. Other title area TAGs also include, This is a searchable index. Enter search keywords: , , , .
The purpose of the tag is to set the webpage title, which is displayed in the title bar of the browser window and not in the page text of the browser. The Favorites, BookMark, or History List functions of most browsers are also named by the file title. <Br/> by <title>...There is no limit on the length of the text to be labeled, but a title that is too long may be truncated and hard to remember.
3.4: Mark the file subject area
Note: In html files...The clipped area is called the object's main area, usually inAfter the CIDR block.
This attribute specifies a graphic file (generally gif or jpeg) as the background pattern. The image is tiled to form the basemap of the entire webpage.