Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <2992742.SPkdTlGXAF@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Mon, 03 Oct 2011 11:40:13 +0200 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 7Bit Subject: Re: Question about new lines Newsgroups: comp.lang.php References: <4e886e7b$0$5356$9a566e8b@news.aliant.net> <4e889326$0$5371$9a566e8b@news.aliant.net> Followup-To: comp.lang.php MIME-Version: 1.0 Lines: 45 NNTP-Posting-Date: 03 Oct 2011 11:40:13 CEST NNTP-Posting-Host: 091dff0b.newsspool2.arcor-online.net X-Trace: DXC=5l]3W2GhXiIAa;:RKVJ>LEA9EHlD;3YcB4Fo<]lROoRA8kF The Natural Philosopher wrote: >> Jeff Gaines wrote: >>> On 02/10/2011 in message <4e889326$0$5371$9a566e8b@news.aliant.net> >>> Linus Flustillbe wrote: >>>> or we could use a

to force a paragraph switch. >>>> Thanks all for your help, I have it working now. >>> Don't forget you should close a

tag with

>> 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: 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
for the OP.
is XHTML SHORTTAG (not considering HTML SHORTTAG, which is widely disregarded by browsers);
,
,
or
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,