Home Web Front-end HTML Tutorial What to do if certain HTML characters cannot be typed

What to do if certain HTML characters cannot be typed

Aug 02, 2021 pm 05:22 PM
html

<p>这一次我们将目光转向HTML,我们都知道在html中有一些字符没有办法写出来,必须要通过其他方式才能书写。今天我们就来介绍一下HTML的字符实体,有需要的可以参考参考。</p> <p>大家了解字符实体吗?防止某些小伙伴不了解,我们先来说一下字符实体。</p> <p>字符实体通俗讲就是网页文件中复杂的符号代码和一些标点的代码。例如小于号<code> ,大于号<code>></code> ,双引号<code>“”</code>这些符号要在浏览器中显示,在HTML文档中都必需被转化成字符实体。字符实体有三部分:一个和号 (&),一个实体名称及一个分号(;),或者 # 和一个实体编号,以及一个分号(;)。</code></p> <p>既然我们已经知道了字符实体,那我们就来看看一些实体的表示方法。</p> <p>我们先来看一个例子。</p> <p><code><</code> 或 <code><</code> 或 <code><</code>是什么意思?第一个表示方法是不是很熟悉,它是小于号的意思。</p> <p>从这个小小的例子可以更加清晰直观的看到HTML字符实体的表示方法。</p> <p>我们现在就来观察各种字符的HTML实体。</p> <p><strong>不间断空格</strong></p> <p>HTML中一大常用字符实体——不间断的空格(<code> </code>)。</p> <p>浏览器总是截断HTML页面中的空格。如果在文本中写入10个空格,浏览器将在显示页面之前删除其中9个空格。要增加页面中的空格数,需要使用 字符实体。</p> <p>例子</p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <p>我就试试有没有大段的空白 。</p> </body> </html></pre><div class="contentsignin">Copy after login</div></div><p>结果<br></p> <p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/image/489/819/762/1627895774618399.png" class="lazy" title="1627895774618399.png" alt="What to do if certain HTML characters cannot be typed"></p> <p>果真出现了大段的空白。</p> <p>其余的我就直接将字符字体写下来,不一一举例啦,毕竟太多了。</p> <p><strong>但是需要注意的是:</strong></p> <p><code><strong>虽然 html 不区分大小写,但实体字符对大小写敏感。</strong></code></p> <p><strong>组合音标</strong></p> <p>语音符号是添加到字母中的“"glyph(字形)”。一些变音符号,如尖音符(<code> ̀</code>)和抑音符(<code> ́</code>)。变音符号可以出现在字母上方和下方、字母内部或两个字母之间。变音符号可以与字母和数字字符结合使用。</p> <p>例如</p> <p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/image/863/225/700/1627896005268799.png" class="lazy" title="1627896005268799.png" alt="What to do if certain HTML characters cannot be typed"></p> <p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/image/827/318/409/1627896042853988.png" class="lazy" title="1627896042853988.png" alt="What to do if certain HTML characters cannot be typed"></p> <p>推荐学习:<a href="https://www.php.cn/course/list/11.html" target="_blank">html视频教程</a></p>

The above is the detailed content of What to do if certain HTML characters cannot be typed. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
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

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)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

Moving Text in HTML Moving Text in HTML Sep 04, 2024 pm 04:45 PM

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

See all articles