Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Html Tags > Re: Closed empt...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 6 Topic 395 of 439
Post > Topic >>

Re: Closed empty elements in html 4.01 strict

by Gazza <news@[EMAIL PROTECTED] > Feb 1, 2006 at 06:40 PM

chromatic_aberration mumbled the following on 01/02/2006 18:23:
> Gazza wrote:

>  > It doesn't hurt to have these close these empty elements, but it
would
>  > be best to either use an XHTML DTD, or stick with /plain/ HTML.
> 
> You can't always do that. Some PHP functions insert <br/> and <img/>
> regardless of the DTD in use.

Care to mention what functions they are? The nl2br() function has the 
following note:
Starting with PHP 4.0.5, nl2br() is now XHTML compliant. All versions 
before 4.0.5 will return /string/ with '<br>' inserted before newlines 
instead of '<br />'.
Nowhere does it mention about returning '<br/>' and I can't think of any 
built-in function that returns '<img/>'.

> 
> That said, I usually stick to HTML 4.01 because of the MIME type issue
> in XHTML... but that's an other topic.

XHTML 1.0 Strict MAY use text/html as the MIME type - there's no issue. 
Once you move onto XHTML 1.1, then you SHOULD be using 
application/xhtml+xml, and SHOULD NOT be using text/html.
See <http://www.w3.org/TR/xhtml-media-types/#summary>.


-- 
Gazza
Mobile Number Network Checker - http://mnnc.net/
Leovanna Leonbergers - http://leovanna.co.uk/
Scarlet Town - http://scarlettown.co.uk/




 6 Posts in Topic:
Closed empty elements in html 4.01 strict
chromatic_aberration <  2006-02-01 14:43:24 
Re: Closed empty elements in html 4.01 strict
Gazza <news@[EMAIL PRO  2006-02-01 14:37:39 
Re: Closed empty elements in html 4.01 strict
chromatic_aberration <  2006-02-01 19:23:13 
Re: Closed empty elements in html 4.01 strict
Gazza <news@[EMAIL PRO  2006-02-01 18:40:17 
Re: Closed empty elements in html 4.01 strict
"Jukka K. Korpela&qu  2006-02-01 20:09:43 
Re: Closed empty elements in html 4.01 strict
David Dorward <dorward  2006-02-01 20:00:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 1:36:05 CDT 2008.