HTML5 Meta CharSet page character encoding shorthand

Source: Internet
Author: User

HTML5 Meta CharSet page character encoding shorthand

HTML5 Meta CharSet page character encoding shorthand abbreviation tutorial (Music relaxation Chair)

In addition to the DOCTYPE HTML can be shortened in HTML5, and this abbreviation compatible with the new old version and different brand browser, meta-CharSet Web page encoding can be abbreviated, but also compatible with the old version of the browser and browser and different brands.

Related Tutorials Learn: HTML5 doctype shorthand

In HTML5 the HTML code optimization shorthand abbreviation, also in the div CSS indispensable charset page encoding code can also be abbreviated shorthand (HTML code optimization compression).
First, Utf-8 encoded original code and simplified abbreviation-TOP

1, the original utf-8 HTML coding tag code is as follows: (Music relaxation chair)

<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>

2, can be abbreviated to

<meta charset= "Utf-8" >

4. UTF HTML encoding shorthand

HTML CharSet Utf-8 Shorthand
HTML CharSet Utf-8 Shorthand

3, abbreviation Compatibility: All browsers are compatible, regardless of the old and new versions of IE or different brand browser are compatible.
Second, gb2312 (GBK) encoded original code and simplified abbreviation-TOP

1, the original gb2312 HTML coding tag code is as follows: (Music relaxation chair)

<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>

2, can be abbreviated to

<meta charset= "gb2312" >

Or

<meta charset= "GBK" >

3, GBK shorthand

HTML GBK and gb2312 encoding shorthand
GBK and gb2312 Shorthand (music relaxation chair)

4, abbreviation Compatibility: All browsers are compatible, regardless of the old and new versions of IE or different brand browser are compatible. As for the GBK coding shorthand when the code is filled out as gb2312 or fill in as gbk,divcss5 think there is no difference, can be. In order to conform to everyone using GBK character encoding, you can write as "gb2312".

HTML5 Meta CharSet page character encoding shorthand

Related Article

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.