Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: not2easy
is technically wrong.
is also wrong
<p>Single line<br>Another line</p>
<p>My text <br /><p>
How to avoid BR in the correct way?
At any rate my solution to avoid the empty <br>: I usually style the element with padding or margins or width so that the content area narrows enough to force line breaks. Unfortunately they don't always break where you want them to, but it's one less hard coded element.
<p>Single line</p> is technically wrong.
Well, you don't know that it will be a single line do you? Maybe your user is reading it on an antiquated phone with a display that's only ten characters wideTwo issues. The one you're referring to is the displayed width of the lines of content. The other is content that by convention only occupies one line. For example:
So what would be "perfect" for a one-liner?Hence I say go back to the content and the context - is that really a "single line", or something else such as a quote, sample, maybe blockquote, perhaps it is really a sub-heading. Part of my thinking is that aside the challenging cases, there is something suspicious about have a "single line" in the middle of a "para". I know we see them all the time ... but is it "correct" or just poor grammar?