Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the characters that need to be escaped in html

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article will explain in detail what characters need to be escaped in html. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

The characters that html needs to escape are "", "&", "", "©", "®", "¥", "use", "commands", "↑", "⇐", "∀", "∈", "∠", "∫", "≠", "⊃", "⊗", "θ", "↓", "⇒", "√", "⊆", "Σ", "ψ" and so on.

The operating environment of this tutorial: windows7 system, HTML5 version, Dell G3 computer.

Why use escape strings?

In HTML, & etc. has a special meaning (for link tags, & for escaping) and cannot be used directly. These symbols are not displayed on the web page we finally see, so what if we want to display these symbols on the web page?

This brings us to the HTML escape string (Escape Sequence).

An escape string (Escape Sequence) is also called a character entity (Character Entity). In HTML, escape strings are defined for two reasons: the first is that symbols like "" are already used to represent HTML tags, so they cannot be used directly as symbols in text. In order to use these symbols in an HTML document, you need to define its escape string. When the interpreter encounters such a string, it interprets it as a real character. When entering escape strings, strictly follow the rules of letter case. The second reason is that some characters are not defined in the ASCII character set, so you need to use an escape string to represent them.

The composition of an escaped string

The escape string (Escape Sequence), that is, the character Character Entity, is divided into three parts: the first part is a & symbol, the English part is called ampersand;, the second part is the Entity name or # plus the Entity number; the third part is a semicolon.

For example, to display the less than sign (

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report