HTML character entity

Source: Internet
Author: User

HTML character entity

Character entity of HTML:

Some Characters in HTML are reserved characters, which can constitute the syntax structure of HTML. For example, greater than (>) and smaller than (<).

Reserved characters cannot be used directly in the HTML source code, because they may be mistaken by the browser for HTML tags. For example:

<Td> is an HTML tag </td>

For example, the above Code is as follows:

<Td> is an HTML Tag.
However, it is very likely that the first <td> tag is discarded by the browser and chained to cause other layout problems. Therefore, these characters must be represented by HTML characters, so greater than (>) is represented as & gt;, and smaller than signs are represented as & lt ;. The above code can be modified:

<Td> is an HTML tag </td>

The code above shows that the representation of character entities is: & + character entity name + semicolon (;). However, in addition to this form, you can also use the & + character entity number + semicolon (;) format. The first form is easy to remember, but some browsers may not support it, the second form can be supported by various browsers, but it is not easy to remember.

Space character entity:

The space character entity describes the space character entity because it may be the most frequently used. When I use the space key in the HTML source code to enter spaces, only the first one can be interpreted by the browser, and others will be ignored. Therefore, if you need to enter multiple spaces, the space character entity is required.

List of common character entities:

 

Original address: http://www.51texiao.cn/HTML5jiaocheng/2015/0606/3389.html

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.