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 6 of 6 Topic 395 of 439
Post > Topic >>

Re: Closed empty elements in html 4.01 strict

by David Dorward <dorward@[EMAIL PROTECTED] > Feb 1, 2006 at 08:00 PM

chromatic_aberration wrote:

> 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?

It is a quirk of SGML.

In HTML <foo /> is equivalent to <foo>> and thus <foo>&gt;.

You can't have &gt; as character data in the <head> (it will imply the end
of the head element and the start of the body element since the </head>
and
<body> tags are options).

You CAN have <br>&gt; because anywhere that <br> is allowed so is &gt;.
The
same applies to <img>, <input> and sometimes <img>. (And I'm not in the
mood to look to see if I've forgotten any other empty elements).

-- 
David Dorward       <http://blog.dorward.me.uk/>
  <http://dorward.me.uk/>
                     Home is where the ~/.bashrc is




 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:35:45 CDT 2008.