Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Which element should be used without BR


alt131 - 12:09 pm on Jun 21, 2012 (gmt 0)


Hi toplisek, I've jumped in here because in Lucy's recent thread about languages I used exactly that structure as an example. Your question is a good one because it highlights that it is wrong. The trouble that we have is that a single sentence/line/phrase is not a paragraph, so this:
<p>Single line</p> is technically wrong.

However, a paragraph is a collection of sentences, so this:
<p>Single line<br>Another line</p>is also wrong

As a consequence marking up things that legitimately have "short" lines like poems and songs is always less than ideal, which is why we see a lot of para's with line breaks.

I'd suggest start with your content: Are you sure you don't have a list, a quote, an example of something (say computer code) or something else that can/should be marked up using it's own element and can then be styled to occupy a separate line using display:block. For example:
<p>Single line
<samp>Another line</samp>
</p>


Thread source:: http://www.webmasterworld.com/css/4467955.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com