html中 rn 表示换行 那么空两格怎么表示

html-css021

html中 rn 表示换行 那么空两格怎么表示,第1张

用 &nbsp代替,代表英文空格,2个&nbsp&nbsp连写代表一个中文空格。

\r\n,java开发时支持此写法,纯HTML静态页面不支持。

换行:用<br>...</br> 或<br />表示

换段:用<p>...</p>表示

英文空格:用&nbsp表示

中文空格:用&nbsp&nbsp表示

当然如果纯文本的话,

可以用padding或margin表示精确距离,也可用text-indent缩进属性表示。

<html>

<head>

<style type="text/css">

.td1 {text-align:leftfont-size:12pt}

.p1 {text-align:lefttext-indent:2emfont-size:12pt}

</style>

</head>

<body>

<table>

<tr><td class="td1">网页制作</td></tr>

<tr><td><p class="p1">语言</p></td></tr>

</table>

</body>

</html>

text-indent:2em 的样式就是空2格,同样:

text-indent:4em就是空4格