Jump to content

<PRE> Tag and Additional Blank Line


amame02

Recommended Posts

Hi, I am trying to use the preforamatted text (pre) tag in my html page and the browser inserts a blank line every time it hits the <pre> tag. I wonder how I can avoid the additional blank line? Thanks.Example:

<html><head><title>Header Info.</title></head><body>Preformatted Text test<pre>    This is line 1</pre><pre>       This is line 2</pre></body></html>

Edited by aspnetguy
Link to comment
Share on other sites

I wonder how I can avoid the additional blank line?  Thanks.
Add margin:0; like so, that will bring them together. :)
<html><head><title>Header Info.</title><style>pre{margin:0;}</style></head><body>Preformatted Text test <br /><pre>    This is line 1</pre><pre>       This is line 2</pre></body></html>

Link to comment
Share on other sites

Hi, I am trying to use the preforamatted text (pre) tag in my html page and the browser inserts a blank line every time it hits the <pre> tag.  I wonder how I can avoid the additional blank line?  Thanks.Example:
<html><head><title>Header Info.</title></head><body>Preformatted Text test<pre>    This is line 1</pre><pre>       This is line 2</pre></body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...