". 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 HTML5

Mar 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
HTML `tabindex` for Keyboard NavigationHTML `tabindex` for Keyboard NavigationJul 23, 2025 am 02:59 AM

tabindex is an attribute in HTML that controls whether elements can be focused and sequenced through the keyboard Tab key. There are three common values: tabindex="0" makes the elements focusable and follow the natural order, tabindex="-1" allows focus through JavaScript but not in the Tab sequence, tabindex="1" or higher forces the order to change but is not recommended. The rational use of tabindex requires priority to use semantic tags, avoid abuse of high numerical values, combine ARIA attributes, and test keyboard navigation. Notes include ensuring that elements are not disabled or hidden, considering browser differences, providing: focus

The `details` Element for Expandable ContentThe `details` Element for Expandable ContentJul 23, 2025 am 02:57 AM

Using HTML tags to achieve expandable content without JavaScript, it is suitable for scenarios such as FAQ, help prompts, and settings panels. 1. The basic usage is to use tags as the trigger title; 2. Closed by default, add open attributes to expand by default; 3. Custom styles can be customized through CSS to match the design style; 4. Pay attention to maintaining interactive feedback to improve user experience; 5. Although the accessibility support is good, compatibility issues of old devices still need to be considered.

Building HTML Dashboards with DataBuilding HTML Dashboards with DataJul 23, 2025 am 02:50 AM

The reason why you choose an HTML dashboard when displaying data is that it is simple and practical. First, determine the data source, such as CSV, Excel, database or API, and the front-end can be processed in JSON format; second, use chart libraries such as Chart.js to achieve visualization, such as drawing a bar chart with canvas; then use CSSGrid or Flexbox to layout and add responsive design; finally pay attention to issues such as loading order and data format to ensure the display effect.

Implementing File Uploads in HTML FormsImplementing File Uploads in HTML FormsJul 23, 2025 am 02:48 AM

The key points of implementing file upload function include the use of add controls, setting enctype attributes, back-end reception and security processing, and compatibility optimization. 1. Use and configure accept, multiple, capture and other attributes in HTML to improve the experience; 2. Enctype="multipart/form-data" must be set in the form to ensure the correct data parsing; 3. The backend selects corresponding solutions according to the language such as PHP's $\_FILES, Node.js's multer, and Python's request.files; 4. The file type, limit size, and rename files to ensure security; 5. Pay attention to common problems such as not

HTML `form` `enctype` Attribute for File UploadsHTML `form` `enctype` Attribute for File UploadsJul 23, 2025 am 02:35 AM

ToenablefileuploadsinHTMLforms,settheenctypeattributeto"multipart/form-data".Thisencodingallowsbinarydatatransmissionandisessentialforfileuploads.UseitwithaPOSTmethodintheformtag.Withoutthissetting,theservercannotproperlyreceivefiles.Common

Creating Clickable Image Maps in HTMLCreating Clickable Image Maps in HTMLJul 23, 2025 am 02:35 AM

If you want to click on different image areas to jump to different links on a web page, you can use HTML imagemap. The specific operation is to combine the tag with the usemap attribute, and then define the clickable area with the tag. 1. Use the corresponding map to specify; 2. Use multiple areas to define different shapes in it; 3. Set shape and coords attributes for each, specifying shapes and coordinates respectively. The format of coords varies according to the shape: the rectangle is x1, y1, x2, y2, the circle is cx, cy, r, and the polygon is the coordinates of multiple points arranged in sequence. It is recommended to use an image editing tool or an online generator to get coordinate values. Notes include: Make sure that mapname corresponds to usemap and is responsive.

The HTML `abbr` Tag for Tooltips and AccessibilityThe HTML `abbr` Tag for Tooltips and AccessibilityJul 23, 2025 am 02:29 AM

TheHTML<abbr>tagisidealforaddingtooltipsandimprovingaccessibilityforabbreviations.1.Itdisplaystooltipsbydefaultwhenatitleattributeisincluded.2.Screenreadersannouncethefullexplanationofabbreviations,enhancingaccessibility.3.Itisbestusedf

Building HTML Sitemaps for SEOBuilding HTML Sitemaps for SEOJul 23, 2025 am 02:26 AM

HTML sitemap is helpful for SEO, which indirectly supports SEO by improving crawling efficiency, optimizing user experience and assisting internal link building. Its main function is to provide users with a clearly structured content index page, making it easier for search engines to discover internal pages of the website. The steps to build an HTML sitemap include: classifying by topic or column, avoiding too many links, using a concise list format, and keeping updates. Not all websites require HTML site maps, but it is recommended to add them for large content, complex structure or e-commerce websites.

See all articles

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

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.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment