11.24. HTML character entity

发布时间 : 2025-10-25 13:33:10 UTC      

Page Views: 9 views

Reserved characters in HTML must be replaced with character entities.

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

11.24.1. HTML entity

In HTML, some characters are reserved.

The less than sign (<) and the greater than sign (>) cannot be used in HTML because browsers mistook them for tags.

If we want to display reserved characters correctly, we must use character entities (character entities) in the HTML source code. Character entities look like this:

& *entity_name*; or &# *entity_number*; 

To display the less than sign, we must write: < or < or <

Tip: the advantage of using entity names instead of numbers is that names are easy to remember. The downside, however, is that browsers may not support all entity names (entity numbers are well supported).

11.24.2. Non-breaking Space

The common character entities in HTML are uninterrupted spaces (& nbsp;).

Browsers always truncate spaces in HTML pages. If you write 10 spaces in thetext, the browser deletes 9 of them before displaying the page. To increasethe number of spaces in the page, you need to use the & nbsp; character entity.

11.24.3. Combined phonetic alphabet

A phonetic symbol is a “glyph” added to a letter.

Some consonant symbols, such as sharp notes and muted notes.

Consonant symbols can appear above and below the letter, or inside the letter, or between two letters.

Phonetic symbols can be used in combination with alphabetic and numeric characters.

Here are some examples:

Phonetic symbols

Character

Construct

Output result

Cymbal

A

Axiomatic 768

A month

Cymbal

A

Axiomatic 769

A month

Cymbal

A

Axiomatic 770

A month

Cymbal

A

Axiomatic 771

A month

Cymbal

O

Odyssey 768

O stories

Cymbal

O

Odyssey 769

O stories

Cymbal

O

Odyssey 770

O stories

Cymbal

O

Odyssey 771

O stories

11.24.4. HTML character entity

Entity names are case sensitive!

Display the results

Description

Entity name

Entity number

Space

& nbsp

& # 160

<

Less than sign

& lt

& # 60

>

Greater than sign

& gt

& # 62

&

And sign

& amp

& # 38

Quotation mark

& quot

& # 34

Apostrophe

& apos; (not supported by IE)

& # 39

To send

Points

& cent

& # 162

£

Pound

& pound

& # 163

¥

RMB / JPY

& yen

& # 165

Euro

& euro

& # 8364

§

Subsection

& sect

& # 167

©

Copyright

& copy

& # 169

®

Registered trademark

& reg

& # 174

Trademark

& trade

& # 8482

×

Multiplication sign

& times

& # 215

/

Division sign

& divide

& # 247

Although html is not case-sensitive, entity characters are case-sensitive.

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。