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 2 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 02:37 PM

chromatic_aberration mumbled the following on 01/02/2006 13:43:
> I "discovered" some time ago, that closing <br> and <img [...]> tags 
> (i.e. <br /> and <img [...] />) in an HTML 4.01 Strict document, 
> actually *validates* on the W3C markup validator... (while <meta /> does

> not, though).
> AFAIK, this should only be the case for XHTML documents...
> So far, I've not been able to find documentation for this 'feature'.
> 
> Anybody knows if this is intentional, or a bug?

The browsers, and in this case, the validation script see the "/" as 
just another attribute. However, it doesn't recognise it, so it ignores 
it. Technically XHTML shouldn't have a space before the / e.g. <br/> but 
then the parser doesn't know an element called "br/". Put the space in, 
and all it sees is the element "br" with an attribute "/".

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.

-- 
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 5:51:59 CDT 2008.