段落后的空格 [英] Space after line break in paragraph

查看:242
本文介绍了段落后的空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用浅黄色方块的HTML网页上显示节目内容,类似此页。要创建一个黄色框,我使用一个带有特殊类的< p> 标记,对于该类,我使用背景颜色以及 font-family:Courier New

I'm displaying programming content on my HTML page using light yellow boxes, similar to this page. To make a yellow box, I use a <p> tag with a special class, and for that class I put in a background color as well as font-family: "Courier New".

在同一框内的行之间使用 br /> 标记到断行。现在的问题是,你可以看到在这个链接,有时应该在换行后有一些空间。但空间不显示给我。

Between lines within the same box, I use the <br/> tag to break line. Now the problem is that, as you can see in that link, sometimes there's supposed to be some space after the line break. But the space doesn't show up for me. How can I make it appear?

推荐答案

不要使用段落。使用 pre

<pre>first line
second line; next line will be blank

fourth line</pre>

这篇关于段落后的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆