freeCodeCamp/guide/chinese/miscellaneous/learn-about-html-entities/index.md

9 lines
612 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Learn About HTML Entities
localeTitle: 了解HTML实体
---
HTML中的某些字符由语言保留例如`<`和`>` 。在HTML文件中将它们用于标签之外的其他内容可能会导致错误因为您的浏览器可能会将它们解释为标签。解决此问题的一种方法是使用HTML实体
`<`可以写成`&lt;` while `>`可写为`&gt;`它们将在浏览器中按预期呈现。
可以在[https://dev.w3.org/html5/html-author/charref](https://dev.w3.org/html5/html-author/charref)找到其他保留字符和键盘中没有的字符如©和Σ的HTML实体的完整列表。