Forum Moderators: open

Message Too Old, No Replies

xhtml 1.0 strict or xhtml 1.1?

What is the difference in these doctypes?

         

gph

5:35 pm on Sep 13, 2002 (gmt 0)

10+ Year Member



I have pages validating with this doctype

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

and am wondering if this is the correct xhtml 1.1 code and what if any differences I should expect using it

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
<?xml version="1.0"? encoding="iso-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

The reason I think I have something wrong in the 1.1 version is that FP auto deletes this line:

<?xml version="1.0"? encoding="iso-8859-1"?>

Thank you for your insight

madcat

6:16 pm on Sep 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Someone else might know the specifics [w3.org], but here is a little info (I think this is what you meant)...

From the source:

XHTML 1.1:

It is not, however, as varied in functionality as the XHTML 1.0 Transitional or Frameset document types. These document types defined many presentational components that are better handled through style sheets or other similar mechanisms. Moreover, since the XHTML 1.1 document type is based exclusively upon the facilities defined in the XHTML modules [XHTMLMOD], it does not contain any of the deprecated functionality of XHTML 1.0 nor of HTML 4. Despite these exceptions, or perhaps because of them, the XHTML 1.1 document type is a solid basis for future document types that are targeted at varied user agent environments.

[w3.org...]

The doctype should look like:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

Madcat

gph

6:42 pm on Sep 13, 2002 (gmt 0)

10+ Year Member



Thanks for the info madcat

When I copy/paste the code you posted into FP 2000 and try and save the file it moves everything but <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> into the body. I guess I'll have to go into FP and see if I can disable this auto "correct" feature.

Nick_W

6:46 pm on Sep 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've found the differneces to be very few. Just do what the validator tells you... no problem ;)

Nick

gph

7:31 pm on Sep 13, 2002 (gmt 0)

10+ Year Member



Thanks Nick

I couldn't find a way to get FP to stop altering the doctype so I added it in a text editor. The only difference I've noticed thus far is that &nbsp; is an unknown entity.

ergophobe

8:31 pm on Sep 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



One thing to remember, if the DOCTYPE is not on the first line, IE6 will switch into quirks mode. So to validate on W3C you need the <?xml ...?> declaration, but IE will then switch to quirks mode.

Tom