Front-end -- about HTML, -- HTML

Source: Internet
Author: User

Front-end -- about HTML, -- HTML

Before talking about HTML, you have to give a rough description of the relationship between the browser and HTML. As we all know, a browser is an application that can call networks and display received html documents. Strictly speaking, the HTML document is a string written according to a certain rule (the same in any language). This string is <! Documents starting with

The official name of HTML is hypertext markup language, which transmits two messages: 1. HTML is a language; 2. HTML can mark non-text content.

Since HTML is a language, it must have something similar to a compiler that performs lexical analysis, syntax analysis, and semantic analysis. This job is done by a browser. Therefore, HTML also has syntax. Its syntax is very simple and generally includes the following six rules:

1. The label should be written in angle brackets <>;

2. The tag is closed (either the end is/or the end is </> );

3. tags can have multiple attributes, such as id and class;

4. labels can be nested, such as <div> <p> </div>;

5. The comment is written as <! -- Xxxxx -->;

6. The characters are case-insensitive;

Based on the above rules, you can write the correct HTML code.

For non-text content, HTML documents can contain images, audios, videos, programs, and other non-text content, which can be marked by specific tags. For example, img, object, script, video, and audio. The non-text content is displayed to the user in its own unique form.

Therefore, I understand three types of labels: 1. you can provide the default style. Of course, this can be rewritten. For example, <strong> the default style is bold; 2. it can provide default functions, such as a tag and select tag; 3. you can divide different semantic regions, such as nav and aside;

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.