Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <1766467.D2KPVSPYKU@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Mon, 03 Oct 2011 14:51:07 +0200 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit 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 14:51:08 CEST NNTP-Posting-Host: 44dc8ecb.newsspool2.arcor-online.net X-Trace: DXC=:??DkBCJj]1nBOkdL^Lo7>A9EHlD;3Yc24Fo<]lROoR18kFO;d2< X-Complaints-To: usenet-abuse@arcor.de Xref: x330-a1.tempe.blueboxinc.net comp.lang.php:3285 Jeff Gaines wrote: > Jerry Stuckle wrote: >> Which isn't valid on html - only xhtml or xml. > > There seems to be confusion about whether or not the / is optional. Yes, that only *seems* to be so. > In reality, of course, all browsers honour it. Your logic is flawed. You simply cannot know about *all* browsers. AISB, *some* browsers, perhaps the majority in terms of market share, do not implement the SGML Declaration for HTML 4.01 [1] properly, which specifies the SHORTTAG syntax for HTML so that `
' is equivalent to `
>' in HTML (that allows, for example `

My Title

') [2]. But the W3C Validator [3] does, which is why, e. g., is _not_ a Valid HTML 4.01 fragment (as `>' would be character data which is not allowed within the `HEAD' element). This has led to the *current* HTML5 Working Draft regarding the trailing `/' between `<' and the corresponding `>' of a start tag as allowed and optional in the HTML syntax of HTML5 [4,5]. But you SHOULD NOT rely on that outside of HTML5, perhaps not even in HTML5 until it has become stable. HTH PointedEars ___________ [1] [2] [3] [4] [5] -- Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network. -- Tim Berners-Lee