2013-05-01 55 views
0

我有以下的HTML正文:如何避免在HTML断行后identation

<a name="milosz"><h2>Learning</h2></a> 
To believe you are magnificent. <br>&nbsp; 
And gradually to discover that you are not magnificent.<br>&nbsp; 
Enough labor for one human life.<br>&nbsp; 
<br>&nbsp; 
<br> 

在网页看起来是这样的:

To believe you are magnificent. 
And gradually to discover that you are not magnificent. 
Enough labor for one human life. 

注意的是,从第二行起句子缩进。 有没有办法避免这种缩进?

+1

您需要从HTML源中删除的群组。 – devnull 2013-05-01 07:47:19

回答

5

您使用与<br>换行符时候开始另一条线。当与空间&nbsp;(这是一个空间的ASCII值),接着,自然这开始于一个空间中的新行。尝试删除&nbsp;

你的情况下

代码

First line<br>&nbsp; 
Second line 

结果

First line 
Second line 

解决方案

代码

First line<br> 
Second line 

结果

First line 
Second line 
1
<br> -- Line Break (New Line) 
&nbsp; -- For Blank Space 

你在每一行本月底书面
是新行(换行符)和缩进您正在使用&nbsp;这是空间

所以删除
和 记住这一条线。

1

使用pre标记像 开放(预)标签 甲 你 要 显示 关闭(预)标签