HTML Basics-browser-related knowledge (Html,doctype, character encoding)

Source: Internet
Author: User

Character sets are: characters (Character) are all kinds of words and symbols, including the national text, punctuation, graphic symbols, numbers and so on. The character set (Character set) is a collection of multiple characters, with a variety of character sets, each with a different number of characters, common character set names: The ASCII character set, the GB2312 character set, the BIG5 character set, the GB18030 character set, the Unicode charset, and so on. For accurate character set literals, character encodings are required to manage the characters in these character sets, so that the computer can accurately handle character sets.

Common character encoding is: Utf-8,ascii code, gb2312 and so on.

Garbled characters in the Web page:

1. In the case of CharSet character encoding, the stored character encoding is not consistent with the explicit encoding method, or the character encoding method and explicit inconsistency of the browser will result in HTML page garbled.

2. In the absence of explicit charset, the character encoding of the browser is different from the encoding used and saved by HTML, which causes the HTML page to be garbled.

Summary: Garbled characters are generated because the character encoding of the browser and the HTML page declaration of the character encoding method and HTML saved encoding inconsistent.

In HTML, the color of the page is written in 3 ways:

color:blue,//Color of Chinese

Color: #000000;//16, generally with the use of cut graphs, this way with the most.

Color:rgb (0,0,0);//(0-255,0-255,0-255)

Also CSS3 new Rgba (0,0,0,0) 4th is transparency, 0 is completely transparent, and 1 is opaque.

The role of <!doctype html>:

is the document declaration of the HTML5 document stating that the HTML document is to be rendered in HTML5 standard.

If the document does not have a DOCTYPE declaration

HTML Basics-browser-related knowledge (Html,doctype, character encoding)

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.