Ask your own question, for FREE!
Computer Science 17 Online
OpenStudy (jagatuba):

In HTML, I want to print something on a new line without any extra space between lines. How?

OpenStudy (jagatuba):

For example: <p>This stuff</p><p>That stuff</p> displays like this (roughly): This stuff That stuff I want it to display like this (roughly): This stuff That stuff Is this even possible using HTML?

OpenStudy (anonymous):

of couse, <p></p> or just <br/> tag . it means "break" or '\n' character. it is a symbol of new line also you can use <div></div> without any styles every new <div> begins in a new line. and many other ways to do what you want...it depends on your additional requirements. just visit http://www.w3schools.com/ you can find many useful information about html, javascript, php, etc.

OpenStudy (jagatuba):

Yeah I love that site. So you are saying the <div> tags will give me a line break without the extra padding that is in <p> and <br />?

OpenStudy (jagatuba):

I'm gonna go try it.

OpenStudy (jagatuba):

Nope. Still gives you that extra padding.

OpenStudy (anonymous):

You can use CSS to fix that padding, if you want. <br> is semantically used to just do a "Return" on the page.

OpenStudy (anonymous):

The problem isn't one of html which describes what the elements of your document are. The problem is one of css which describes how the page should look. You want to adjust the margin or padding (or both) using css. You don't have to do anything to your html.

OpenStudy (anonymous):

If you are using Firefox, I can recommend installing FireBug, if you have further formatting issues. You can use FireBug to check how much padding you have, or any other part of the box layout, to see why your elements look like they do.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!