HTML space空格代码

本文概述

有多种方法可以在单词或字符之间插入空格:

使用空格键

要在单词之间添加空格, 首先我们必须单击要添加空格的位置, 然后按空格键。 HTML文档在单词之间仅使用一个空格。简而言之, 如果我们按空格键超过一次, 那么它将在浏览器上的单词之间仅显示一个空格, 如下例所示:

<head>
<title>
 Example of space 
</title>
<head>
<body>
JavaT   Point
</body>
</html>

立即测试

在此示例中, 我们多次按下空格键, 但是以下输出仅显示JavaT和Point之间的一个空格。

使用&ampnbsp;

&ampnbsp;是HTML文档中使用的不间断空格。这是最常用的间距方法, 可以防止折线。以下示例确定如何使用:

<html>
<head>
<title>
 Example of space 
</title>
<head>
<body>
JavaT  &ampnbsp; &ampnbsp; &ampnbsp; &ampnbsp;  Point
</body>
</html>

立即测试

输出:

HTML space空格代码

浏览器支持

Element Chrome IE Firefox Opera Safari
<Space> Yes Yes Yes Yes Yes

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_49870.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?