gawain Posted February 5, 2007 Share Posted February 5, 2007 Hi everybody.I've got a simple file with a background image.A) If I've got this doctype <!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html'>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" />I can't see anything in FFox, whereas I can see just a slice of the image in IExplorer 7According to this page http://www.w3schools.com/xhtml/xhtml_dtd.asp ,it should be the right order:1) doctype2) html tag:) If I've got this doctype<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" /><!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> I can see everything well both in FFox and in IExplorer 7.But the html tag comes firstOne more question: what about when I close the tag in a metatag: is that correct to write the slash at the end, like this:<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />Thanks for any hint Link to comment Share on other sites More sharing options...
kingsend84 Posted February 5, 2007 Share Posted February 5, 2007 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">The doctype should be first Also the meta is correct to close it like that. Link to comment Share on other sites More sharing options...
gawain Posted February 6, 2007 Author Share Posted February 6, 2007 Thanks for replying.With this code <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> the page doesn't work Link to comment Share on other sites More sharing options...
jlhaslip Posted February 6, 2007 Share Posted February 6, 2007 Here is a valuable link to the w3c approved DTD's.http://www.w3.org/QA/2002/04/valid-dtd-list.htmlIf you use the reccomended Template, drop the first xml line because it causes problems in (you guessed it) IE. Link to comment Share on other sites More sharing options...
gawain Posted February 7, 2007 Author Share Posted February 7, 2007 Here is a valuable link to the w3c approved DTD's.http://www.w3.org/QA/2002/04/valid-dtd-list.htmlIf you use the reccomended Template, drop the first xml line because it causes problems in (you guessed it) IE.OK. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now