HTML character entity

Reserved characters in HTML must be replaced with character entities.

Some characters that cannot be found on the keyboard can also be replaced using character entities.


HTML Entity

Some characters have special meanings in HTML , for example, the less than sign < represents the beginning of HTML. This less than sign will not be displayed in the web page we finally see. So what should we do if we want to display a less than sign on the web page?

This is about HTML Character Entities.

A character entity (Character Entity) is divided into three parts: the first part is an & symbol, called ampersand in English; the second part is the entity (Entity) name or # plus the entity (Entity) number; the third part is the entity (Entity) name or # plus the entity (Entity) number; part is a semicolon.

For example, to display the less than sign, you can write < or <.

The advantage of using an entity name is that it is easier to understand. When you look at lt, you can probably guess that it means less than, but its disadvantage is that not all browsers support the latest Entity name. The entity number can be processed by various browsers.


Combined with phonetic symbols

The pronunciation symbol is a "glyph" added to the letter.

Some diacritical marks, such as acute accent ( ̀) and grave accent ( ́) .

Diacritical marks can appear above and below letters, within letters, or between two letters.

Diacritics can be used in combination with alphabetic and numeric characters.

The following are some examples:

##Phonetic symbols
Characters
Construct Output result


## ̀ ## a

## à
à


## ́

## a
a& #769;

                                                                                     
##                             a  â    â

   

      ̃

    a  ã

    ã

   #  O& #770;


##      ̀

# O


#    Ó

  

#    ∧#    O
    Ô


#    O


  Õ

    Õ#


HTML Character Entity

Entity names are case-sensitive!

Character entity list

## < Less than sign < <## >##                                                          #
Display results Description Entity name Entity number

Space    
Greater than number > & #62;
## " " Quotation marks " " "## ' ¢                                                                        # £ ¥
Apostrophe ' (IE does not support) '
fen   ¢   ¢
## ¥ Yen ¥
##                                                                                               using   with                     ’ s ’ ’ s ’ ’s ’ s ’ ’ s ’ to ​ to                 ‐ to § Section § § © Copyright © ©## ®## ™ Trademark ™ ™
Registered Trademark ® & #174;
## divide sign ÷  ÷
× Multiplication sign × # ÷
##View the complete site HTML Entities: Please click on the HTML Entities Reference Manual.




# Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> </head> <body> <h1>HTML 实体字符</h1> </body> </html>
submitReset Code