". The browser will mistake them for tags; in this case, you can use the character entities "<" and ">" to display them."/> ". The browser will mistake them for tags; in this case, you can use the character entities "<" and ">" to display them.">
search
HomeWeb Front-endHTML TutorialHow to display special symbols in HTML5
How to display special symbols in HTML5Mar 08, 2021 am 11:34 AM
html5special symbols

在HTML5中,特殊符号可以通过“字符实体”来显示。HTML中一些特殊符号是无法直接使用显示的,例如“”,浏览器会误认为它们是标签;此时就可以使用字符实体“”来显示它们。

How to display special symbols in HTML5

本教程操作环境:windows7系统、HTML5版、Dell G3电脑。

在 HTML 中,某些字符是预留的。

在 HTML 中不能使用小于号(),这是因为浏览器会误认为它们是标签。

如下面的html代码:

   <body>
        显示:<input id="myTest" type="text" value="5<=6" ></input>
    </body>

上面的value属性值中含有“

如果希望正确地显示预留字符,我们必须在 HTML 源代码中使用字符实体(character entities)。 字符实体类似这样:

&entity_name;
或
&#entity_number;

如需显示小于号,我们必须这样写:90d2ad6f3ef3b7145928d14b93a5f123

大于号Greater than ? ? 问号Question mark @ @ Commercial at A A 大写A Capital A B B 大写B Capital B C C 大写C Capital C D D 大写D Capital D E E 大写E Capital E F F 大写F Capital F G G 大写G Capital G H H 大写H Capital H I I 大写J Capital I J J 大写K Capital J K K 大写L Capital K L L 大写K Capital L M M 大写M Capital M N N 大写N Capital N O O 大写O Capital O P P 大写P Capital P Q Q 大写Q Capital Q R R 大写R Capital R S S 大写S Capital S T T 大写T Capital T U U 大写U Capital U V ##V Capital V Capital V ##WW Capital W Capital W XX Capital X Capital X YY Capital Y Capital Y ##Z ## Z Capital Z Capital Z [ [ Left square bracket \ \ BackslashReverse solidus (backslash) ##] ##] Right square bracket ^ ^ Caret _ _ underscoreHorizontal bar (underscore ) ` ##` Acute accent a ##a lowercase a Small a b b lowercase b Small b c c lowercase c Small c d d small d Small d ##e ##e Lower case e Small e ff Lowercase f Small f g ##g lowercase g Small g h ##h small h Small h i ##i lowercase i Small i j j 小 j Small j ##k k lowercase k Small k ll 小l Small l ##m ##& #109; lowercase m Small m n n Lowercase n Small n o ##o Lowercase o Small o p p lowercase p Small p q ##q small q Small q r ##r small r Small r s s Lowercase s Small s t t small t Small t u u lowercase u Small u v v small v Small v ##w ##& #119; lowercase w Small w x x Lower case x Small x y ##y Lowercase y Small y zz lowercase z Small z ##{ { Left curly brace | | Vertical bar # #}} Right curly brace ##~ ~ Tilde —  Unused     Nonbreaking space ¡ ¡ ¡ Inverted exclamation ¢ ¢ ¢ Cent sign £ £ £ Pound sterling ¤ ¤ ¤ General currency sign ¥ # #¥ ¥ Yen mark ##¦ ##¦ ; ¦ or &brkbar;“` ##§ ##§ § ; Section sign ¨ ##¨ ¨ or ¨“` © © © Copyright logoCopyright ##ª ##ª ª Feminine ordinal « ##« « Left angle quote, guillemet left ¬ “`¬ ¬ Not sign “““ ­ ­ Soft hyphen ##® ® ® Registered trademark ##¯ ¯ ¯ or &hibar;“` ##° ° ° Degree sign ± ± ± Plus or minus ² ² ² Superscript two ³ 179; ³ Superscript three ´ ##´ ´ Acute accent µµ µ Micro sign ¶ ##¶ ¶ Paragraph sign · ##· · Middle dot ##¸ ¸ ¸ Cedilla ¹ ##¹ Superscript one º ##º º Masculine ordinal » » » Right angle quote, guillemet right ¼ ##¼ ¼ Fraction one-fourth ½ ½ ½ Fraction one-half ¾ ¾ ¾ Fraction three-fourths ¿ ¿ ¿ Inverted question mark ##À À À Capital A, grave accent##Á Á Á Capital A, acute accent ##   Capital A, circumflex ##à à à Capital A, tilde ##Ä 196; Ä Capital A, di?esis / umlaut Å & #197; Å Capital A, ring ##Æ ##Æ Æ Capital AE ligature Ç Ç Ç Capital C, cedilla ##È È È Capital E, grave accent É ##É É Capital E, acute accent##Ê ##Ê Ê Capital E, circumflex ##Ë Ë Ë Capital E, di?esis / umlaut Ì Ì Ì Capital I, grave accent Í Í Í Capital I, acute accent Î Î Î Capital I, circumflex Ï Ï Ï Capital I, di?esis / umlaut Ð Ð Ð Capital Eth, Icelandic Ñ Ñ Ñ Capital N, tilde Ò Ò Ò Capital O, grave accent Ó Ó Ó Capital O, acute accent Ô Ô Ô Capital O, circumflex Õ Õ Õ Capital O, tilde Ö Ö Ö Capital O, di?esis / umlaut × × × 乘号Multiply sign Ø Ø Ø Capital O, slash Ù Ù Ù Capital U, grave accent Ú Ú Ú Capital U, acute accent Û Û Û Capital U, circumflex Ü Ü Ü Capital U, di?esis / umlaut Ý Ý Ý Capital Y, acute accent Þ Þ Þ Capital Thorn, Icelandic ß ß ß Small sharp s, German sz à à à Small a, grave accent á á á Small a, acute accent â â â Small a, circumflex ã ã ã Small a, tilde ä ä ä Small a, di?esis / umlaut å å å Small a, ring æ æ æ Small ae ligature ç ç ç Small c, cedilla è è è Small e, grave accent é é é Small e, acute accent ê ê ê Small e, circumflex ë ë ë Small e, di?esis / umlaut ì ì ì Small i, grave accent í í í Small i, acute accent î î î Small i, circumflex ï ï ï Small i, di?esis / umlaut ð ð ð Small eth, Icelandic ñ ñ ñ Small n, tilde ò ò ò Small o, grave accent ó ó ó Small o, acute accent ô ô ô Small o, circumflex õ õ õ Small o, tilde ö ö ö Small o, di?esis / umlaut ÷ ÷ ÷ 除号Division sign ø ø ø Small o, slash ù ù ù Small u, grave accent ú ##ú ú Small u, acute accent û ##û û Small u, circumflex ##ü ü ü Small u, di?esis / umlaut ý ý ý Small y, acute accent þ þ Small thorn, Icelandic ÿ ##ÿ ÿ Small y, umlaut More Programming For related knowledge, please visit: programming video! !

The above is the detailed content of How to display special symbols in HTML5. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
html5的div一行可以放两个吗html5的div一行可以放两个吗Apr 25, 2022 pm 05:32 PM

html5的div元素默认一行不可以放两个。div是一个块级元素,一个元素会独占一行,两个div默认无法在同一行显示;但可以通过给div元素添加“display:inline;”样式,将其转为行内元素,就可以实现多个div在同一行显示了。

html5中列表和表格的区别是什么html5中列表和表格的区别是什么Apr 28, 2022 pm 01:58 PM

html5中列表和表格的区别:1、表格主要是用于显示数据的,而列表主要是用于给数据进行布局;2、表格是使用table标签配合tr、td、th等标签进行定义的,列表是利用li标签配合ol、ul等标签进行定义的。

html5怎么让头和尾固定不动html5怎么让头和尾固定不动Apr 25, 2022 pm 02:30 PM

固定方法:1、使用header标签定义文档头部内容,并添加“position:fixed;top:0;”样式让其固定不动;2、使用footer标签定义尾部内容,并添加“position: fixed;bottom: 0;”样式让其固定不动。

html5中不支持的标签有哪些html5中不支持的标签有哪些Mar 17, 2022 pm 05:43 PM

html5中不支持的标签有:1、acronym,用于定义首字母缩写,可用abbr替代;2、basefont,可利用css样式替代;3、applet,可用object替代;4、dir,定义目录列表,可用ul替代;5、big,定义大号文本等等。

HTML5中画布标签是什么HTML5中画布标签是什么May 18, 2022 pm 04:55 PM

HTML5中画布标签是“<canvas>”。canvas标签用于图形的绘制,它只是一个矩形的图形容器,绘制图形必须通过脚本(通常是JavaScript)来完成;开发者可利用多种js方法来在canvas中绘制路径、盒、圆、字符以及添加图像等。

html5废弃了哪个列表标签html5废弃了哪个列表标签Jun 01, 2022 pm 06:32 PM

html5废弃了dir列表标签。dir标签被用来定义目录列表,一般和li标签配合使用,在dir标签对中通过li标签来设置列表项,语法“<dir><li>列表项值</li>...</dir>”。HTML5已经不支持dir,可使用ul标签取代。

Html5怎么取消td边框Html5怎么取消td边框May 18, 2022 pm 06:57 PM

3种取消方法:1、给td元素添加“border:none”无边框样式即可,语法“td{border:none}”。2、给td元素添加“border:0”样式,语法“td{border:0;}”,将td边框的宽度设置为0即可。3、给td元素添加“border:transparent”样式,语法“td{border:transparent;}”,将td边框的颜色设置为透明即可。

html5为什么只需要写doctypehtml5为什么只需要写doctypeJun 07, 2022 pm 05:15 PM

因为html5不基于SGML(标准通用置标语言),不需要对DTD进行引用,但是需要doctype来规范浏览器的行为,也即按照正常的方式来运行,因此html5只需要写doctype即可。“!DOCTYPE”是一种标准通用标记语言的文档类型声明,用于告诉浏览器编写页面所用的标记的版本。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool