HTML character entity, html character entity

Source: Internet
Author: User

HTML character entity, html character entity

Reserved characters in HTML must be replaced with character entities.

HTML Entity

Some characters are reserved in HTML.

You cannot use signs (<) or greater than signs (>) in HTML. This is because the browser mistakenly believes that they are tags.

To correctly display reserved characters, we must use character entities in the HTML source code ).

Character entities are similar to the following:

&entity_name;
&#entity_number;

To display a smaller sign, we must write as follows: & lt; or & #60;

Tip: the advantage of using entity names instead of numbers is that names are easy to remember. However, the disadvantage is that the browser may not support all Entity Names (the support for entity numbers is good ).

Useful character entities in HTML

Note: The object name is case sensitive!

 

Display result Description Entity name Entity ID
  Space & Nbsp; & #160;
< Yu no. & Lt; & #60;
> Yu no. & Gt; & #62;
& And number & Amp; & #38;
" Quotation marks & Quot; & Amp; #34;
' Marker & Apos; (not supported by IE) & Amp; #39;
Bytes Cent) & Cent; & #162;
£. Pound (pound) & Pound; & #163;
¥ Yuan (yen) & Yen; & #165;
Euro (euro) & Euro; & #8364;
§ Section & Sect; & #167;
Copyright) & Copy; & #169;
Registered Trademark & Reg; & #174;
Trademark & Trade; & #8482;
× Multiplication number & Times; & #215;
Bytes Division Number & Divide; & #247;

 

 

Reprinted: http://www.w3school.com.cn/html/html_entities.asp

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.