• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Whats better practice: <br /> or <p class="marginontop">?

Hello HTMLers,

So I've been making a few websites now - and always strive do do things the best way - so i struggle a bit when in the middle of paragraphs and i need a break, i don't like the look of <br /> and think its kind of cheating BUT easier than creating a new class of <p> with margin added on top.

However, if someone could reasure me that either <br /> isn't cheating or that a new class of <p> is by far better in the eyes of, say google, then that would make my day... thanks!
 
Have you guys lost it? <br /> vs <p> are you serious? Do whatever makes the site look better. I seriously doubt that google gives a rat's --- either way.
 
If you're in the middle of a paragraph and need to use a linebreak, you'd be silly to use anything other than <br />. That's exactly what it's for.

Don't, however, use it like such

Code:
<p>Blah blah blah<p>
<br /><br />
<p>Blah blah blah<p>
<br /><br />
<p>Blah blah blah<p>
<br /><br />
<p>Blah blah blah<p>

If you're doing this, you should be using margin-top instead.
 
Back
Top