11.24. HTML character entity

Release time : 2024-02-22 23:00:07 UTC      

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: &lt; or &#60; or &#060;

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.

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.