Forum Moderators: open
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
This is the autogenerated code by dreamweaver MX latest version thatsy i am little confused about the code. in the 1st line xhtml is also writen at last.
Now Should i have only this much
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
suggest plz..
Exp..
confuse 9 out of 10 browsers
Using XHTML syntax won't confuse browsers at all. If Dreamweaver insists on specifying XHTML 1.0 Transitional that's just fine. You should leave the
xmlns attribute in place as, whilst it has no real meaning unless serving the page as XML (a bad idea), it is part of the usual syntax when using XHTML. The problem with simply changing to an HTML 4.01 (Strict or Transitional) doctype is that other markup generated by Dreamweaver is most likely to be XHTML rather than HTML (trailing slashes on line breaks and image elements, for example).
Just make sure the doctype line is on the very first line of your document with no comments or white space before it to ensure proper browser rendering. :)