FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Question about new lines
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Question about new lines [message #175506 is a reply to message #175505] Mon, 03 October 2011 09:40 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
Jeff Gaines wrote:

> The Natural Philosopher wrote:
>> Jeff Gaines wrote:
>>> On 02/10/2011 in message <4e889326$0$5371$9a566e8b(at)news(dot)aliant(dot)net>
>>> Linus Flustillbe wrote:
>>>> or we could use a <p> to force a paragraph switch.
>>>> Thanks all for your help, I have it working now.
>>> Don't forget you should close a <p> tag with </p>
>> I have never seen that ever in any source
>
> Really?
>
> http://www.w3schools.com/tags/tag_p.asp

W3Schools can be safely and must be strongly recommended against for use as
a reliable resource on Web development. When in doubt, consult the official
Specifications:

<http://www.w3.org/TR/html401/struct/text.html#edef-P>

However, the P/p element does have an _end_ tag, and it is a good idea to
use it so that the paragraph will be delimited *explicitly*. In XHTML, it
is mandatory anyway, as XHTML is an application of XML and well-formedness
requires either an end tag or SHORTTAG syntax (as below).

> That would be an advantage of using <br /> for the OP.

<br /> is XHTML SHORTTAG (not considering HTML SHORTTAG, which is widely
disregarded by browsers); <br>, <bR>, <Br> or <BR> is HTML. PHP has the
nl2br() function to make printing newlines as BR/br elements in (X)HTML
easier.

BR/br usually suffices for debugging purposes. However, semantics are
important: If the intention is to make a paragraph, use the P/p element; if
it is to make an unconditional *line break* *within* *a* *text* *paragraph*,
use the BR/br element.


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300dec7(at)news(dot)demon(dot)co(dot)uk>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: comparing dates?
Next Topic: hai
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 03:13:25 GMT 2024

Total time taken to generate the page: 0.04323 seconds