Get single spacing coding html in Notepad

September 30, 2010 at 09:49:55
Specs: Vista SP1, 3.0Ghz,2Ghz

How does one get single spacing for HTML coding if you are using Notepad as an editor. When I code a page and then view it in the browser, the lines are all double spaced. I know Front Page by default double spaces everything but you can get a single space by hitting Shift and Enter key or something like that. Can you do a similar thing with Notepad? Is there an HTML tag which forces a single space? Thanks.

See More: Get single spacing coding html in Notepad

Report •

September 30, 2010 at 13:08:26

I used notepad all the time for html, but have never encountered that problem; are you using <pre? If so, it may be the type of font you're using in notepad.

What you might try to see if it helps, is use notepad's replace feature to replace all of the white space with & nbsp ; (<--no spaces; the board wants to use the entity)

Another possibility if you're using a stylesheet is to check the font itself, letter-spacing: some_value or perhaps margin and/or padding properties.

I have no aspiration for preaching. ;-)

Report •

September 30, 2010 at 19:08:34

I guess I phrased my question incorrectly. The reult doc does show single spacing but for some lines I don't want any spacing between them! How do I accomplish that? Do I need a more sophisticated text editor?

Report •

October 1, 2010 at 19:19:34

Uhm, I still don't follow. Can you post the HTML in question? or a screenshot or something?

And, yes, I would recommend a better text editor too, these two are free & much nicer than plain notepad:

Report •

Related Solutions

October 2, 2010 at 19:06:56

Thanks for responding. Actually, I figured it out. I didn't want any spaces between lines in some paragraphs. All I had to do was start a paragraph with the paragraph tag and at the end of one line insert a </br> tag. Then, at the start of the next line, just type and keep adding </br> at the end of the line(s) until you want a new paragraph, at which point you end the line with a </p>. This results in a block paragraph with no spacing between the lines.

This paragraph will have no spaces</br>
between the lines. To start a new paragraph, </br>
and end this one, just add an end paragraph tag at the end of</br>
this paragraph.</p>

Now use an opening paragraph tag to begin a new paragraph....

The default is to single space between lines unless you use the code above. You can get double spacing by using the default and adding a </br> at the end of a line.

Thanks for the links.

Report •

Ask Question