Ask your own question, for FREE!
Computer Science 20 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!
Latest Questions
Breathless: Spooky witch but cute
4 hours ago 3 Replies 0 Medals
Arriyanalol: help
3 hours ago 10 Replies 2 Medals
Arriyanalol: @tinydinoUwU stop trying to find a argument u blad lil boy
1 day ago 5 Replies 3 Medals
Jaded012023: Please tell me what you all think of this song
6 hours ago 6 Replies 1 Medal
Arriyanalol: bro how
6 hours ago 2 Replies 3 Medals
Arriyanalol: cant wait for the new bluey movie in 2027
1 day ago 12 Replies 2 Medals
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!