You are here: Re: Layout of self-closing divs - can anyone explain this? « HTML « IT news, forums, messages
Re: Layout of self-closing divs - can anyone explain this?

Posted by David Dorward on 08/03/07 21:45

On Aug 3, 6:04 pm, Ben C <spams...@spam.eggs> wrote:
> On 2007-08-03, David Dorward <dorw...@gmail.com> wrote:
> > I believe SGML can cause it to mean the same as <div></div> (and that
> > is the case for XML), but the declaration for HTML isn't set up that
> > way.
>
> That is the case for XML, but not I think for SGML.

As I said - it depends on the SGML declaration.

> It means something
> else entirely in SGML but I don't believe that bit of SGML syntax made
> it into HTML or if it did no browsers support it anyway.

Emacs-W3 did. I believe it was crippled after the travesty that was
XHTML 1.0 Appendix C.

> > Additionally, browsers use tag soup slurpers and not real SGML
> > parsers, so <div /> actually gets treated as <div>.
>
> It will get treated as <div></div>

Any end tags inserted by error recovery will depend on what follows
the tag, and end tag won't be implied soley by the presence of a tag
in that style.

> if the browser realizes it's dealing with XML.

Which it presumably isn't. The OP implied he was dealing with HTML.

> Whether it gets that from the Content-Type header or from the doctype, I'm not sure.

I'm not aware of any user agent, except the W3C Markup Validator, that
switches parser depending on factors other then the Content-Type.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация