Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

For convenience, I write all my blog posts in bare HTML. Everything seems to be working, but I see that sometimes, Blogger's WYSIWYG editor wraps everything up in a <div> and uses <p> tags. Should I use those? I usually just type in raw text and use double <br> tags to differentiate between paragraphs. Is this acceptable?

share|improve this question
    
Depends on if you want line breaks or paragraphs –  Eight Days of Malaise Sep 11 '12 at 22:35
add comment

1 Answer

up vote 6 down vote accepted

You shouldn't use br elements for separating paragraphs. From the HTML5 specification:

br elements must be used only for line breaks that are actually part of the content, as in poems or addresses.

A paragraph should be enclosed in a p element.

The div element doesn't add/change any meaning. At most it changes the styling of the content (via CSS; depends on the theme). So you can omit it if you are happy with the design of your content.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.