Re: Purpose of "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Lucas Tam wrote:

> "Steve" <bahram@xxxxxxxxxxxxx> wrote in news:1125574881.428752.139150
> @g49g2000cwa.googlegroups.com:
>
>
> > 1. Can someone please explain to me the purpose of including:
> >
> > "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
> > and
> > xmlns="http://www.w3.org/1999/xhtml";
>
> It tells the web browser which schema you're using in your HTML/XHTML
> document.
>
> > Also:
> >
> > 2. Is it strictly necessary?
>
> No, but it's good to define the schema
>
> > 3. Does it affect the speed at which the page is rendered to the
> client
> > user?
>
> Not sure about speed, but it does affect the layout/rendering of the
> web page.

Absolutely. Providing a proper document type makes the browser render
the page in standards compliant mode. Otherwise, a page is rendered in
"quirks" mode. That's at least true for IE and Mozilla, not sure about
Opera.

Cheers,
--
http://www.joergjooss.de
mailto:news-reply@xxxxxxxxxxxxx
.



Relevant Pages