<br> was [PHP] Re: render html
| From: | tedd | Date: | Sun, 21 Sep 2008 13:16:49 +0000 |
| Subject: | <br> was [PHP] Re: render html | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-280631@lists.php.net to get a copy of this message | ||
At 8:17 AM +0200 9/21/08, Lupus Michaelis wrote:
Michelle Konzack a écrit :Definitely no : <http://www.w3.org/TR/2006/REC-xml-20060816/#dt-empty> <http://www.w3.org/TR/2006/REC-xml-20060816/#NT-S> Or maybe for buggy browsers ?$body = "hello<br/><ul>ier</ul>hellohello";^^^^^ Should be <br />
I've always found this confusing. If one uses a <br> tag, you'll get a single line break and everything validates per W3C -- as long as you're not using a xml doctype. If you use <br/> or <br /> tags, then both will generate a line break, but both will also generate W3C shorttag validation warnings. If you use <br></br>, then you'll get a single line break, but that will also generate a W3C validation error, which is worse than a warning. However, if you read this: <http://www.w3.org/TR/2006/REC-xml-20060816/#dt-empty> One would think that using <br></br> or <br/> tags are fine, but they're not -- and <br> isn't even mentioned. So considering all the different ways one can do this, the one that's the least problematic is <br>. Of course, one could use: <div> </div> and side-step the entire issue. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.comDefinitely no ??? <<<