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

本教程操作环境: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
??@@AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUV
Capital W Capital W Capital X Capital XCapital Y Capital Y## Z
[
\
Right square bracket CaretunderscoreHorizontal bar (underscore )Acute accent a
b
c
d
##gh##hi
lowercase k Small k小l Small l##& #109;
n
small q Small qsmall r Small rs Lowercase s Small stsmall t Small tulowercase u Small uvsmall v Small v##w
##{{|
}
Yen mark##¦ ; ¦
Section signor ¨“`©Copyright logoCopyright##ª
“`¬ ¬
® ®##¯¯ ¯
Acute accentMicro sign##¶ ¶Paragraph sign##· ·
Superscript oneMasculine ordinal »Right angle quote, guillemet right¼
½
¾
¿
##ÂÂ Â##ÃÃ Ã
##Æ ÆCapital AE ligatureÇ ÇCapital C, cedillaÈ È
Capital E, circumflex##Ë
ÌÌ ÌÍÍ ÍÎÎ ÎÏÏ ÏÐÐ ÐÑÑ ÑÒÒ ÒÓÓ ÓÔÔ ÔÕÕ ÕÖÖ Ö×× ×ØØ ØÙÙ ÙÚÚ ÚÛÛ ÛÜÜ ÜÝÝ ÝÞÞ Þßß ßàà àáá áââ âãã ãää äåå åææ æçç çèè èéé éêê êëë ëìì ìíí íîî îïï ïðð ðññ ñòò òóó óôô ôõõ õöö ö÷÷ ÷øø øùù ùú
Small u, circumflexü üSmall u, di?esis / umlautý ýSmall y, acute accentþ þSmall thorn, Icelandic##ÿ ÿ
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!
HTML `tabindex` for Keyboard NavigationJul 23, 2025 am 02:59 AMtabindex 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 ContentJul 23, 2025 am 02:57 AMUsing 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 DataJul 23, 2025 am 02:50 AMThe 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 FormsJul 23, 2025 am 02:48 AMThe 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 UploadsJul 23, 2025 am 02:35 AMToenablefileuploadsinHTMLforms,settheenctypeattributeto"multipart/form-data".Thisencodingallowsbinarydatatransmissionandisessentialforfileuploads.UseitwithaPOSTmethodintheformtag.Withoutthissetting,theservercannotproperlyreceivefiles.Common
Creating Clickable Image Maps in HTMLJul 23, 2025 am 02:35 AMIf 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 AccessibilityJul 23, 2025 am 02:29 AMTheHTML<abbr>tagisidealforaddingtooltipsandimprovingaccessibilityforabbreviations.1.Itdisplaystooltipsbydefaultwhenatitleattributeisincluded.2.Screenreadersannouncethefullexplanationofabbreviations,enhancingaccessibility.3.Itisbestusedf
Building HTML Sitemaps for SEOJul 23, 2025 am 02:26 AMHTML 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.


Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Notepad++7.3.1
Easy-to-use and free code editor

Dreamweaver CS6
Visual web development tools

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
Powerful PHP integrated development environment







