Character entities for HTML

Source: Internet
Author: User

Character entities for HTML:

Some characters in HTML are reserved characters, which means that they can form part of the grammatical structure of the HTML. For example, the greater than sign (>) and less than (<).

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

< TD >< TD > is an HTML tag </td>

For example, the above code we want to express is:

<td> is an HTML tag
However, it is possible that the first <td> tag is invalidated by the browser misreading and the linkage leads to other layout problems. So these characters need to be represented by an HTML character entity, then the greater than sign (>) is represented as &GT, and the less-than sign is represented as &lt;. Then the above code can be modified to:

< TD >< TD > is an HTML tag </td>

With the above code, you can see that the representation of a character entity is: &+ character entity name + semicolon (;). However, in addition to this form can also use the &+ character entity number + semicolon (;) Form, the first form is easy to remember, but may be some browsers do not support, the second form can be supported by the browser, but not easy to remember.

Space character entity:

The space character entity uses the representation to introduce a space character entity because it is probably the most frequently used one. When I use the space bar in the HTML source code to enter a space, only the first one can be interpreted by the browser, the other will be ignored, so if you need to enter more than one space, you will use the space character entity.

List of commonly used character entities:

The original address is: http://www.51texiao.cn/HTML5jiaocheng/2015/0606/3389.html

Character entities for HTML

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.