View Full Version : New HTML/XHTML Pages

07-12-2006, 11:56 PM
Here is what is generated by Dreamweaver MX 2004 from "New>HTML" on the menu, without asking for XHTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>


Here is what is generated by Dreamweaver MX 2004 from "New>HTML" on the menu, when I ask for XHTML with a checkbox:

<!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">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>


What is generated might be affected by options I chose when I installed Dreamweaver many months ago. My questions are:

1) Do you get this code when you ask for a new HTML or XHTML page to work on?

2) Can these pages be changed by the Dreamweaver user? For example, I might want additional lines or comments in the <head> section every time.

07-14-2006, 08:57 AM
Yes there is doctype difference in these 2 pages because of your selection that makes the page XHTML compliance.

You can use any of them but you should know the differences between them.
The differences are very minor, but the results of switching is worth hardwork. The primary benefit is that XHTML (extensible) is more widely accepted in non "computer" devices like cell phone, palm devices and other scaled down browsers.
Some very basic diffrences in XHTML are
-Tags in the page MUST be in lower case and must close.
-Tags must be properly nested.
-All attributes must also be lowercase and values for attributes must be encased in single or double quotes.
-All attributes must be long form, not abbreviated
and ...

regarding changing default page settings, i guess (not sure never tried)
if you go to Macromedia\Dreamweaver\ Configuration\Templates\default.html
and change this file this should do.

Creative Insanity
07-14-2006, 08:12 PM
Someone else who know the REAL reason for the XHTML extension.
I remember banging my head with someone else on here about this and now it is good to see someone that actually understands doctypes and why some are good for some options and some are better for others.

Thanks Ram.

07-15-2006, 03:37 PM
XHTML is the latest official standard for HTML documents. Implementation in popular browsers are so-so, so plenty of people don't care yet.

The most important differene ramandeep already pointed out:
-All tags needs to be closed (even IMG tags which wuld close itself(<img />))
-All tags are lowercase.

XHTML can be seen as a transitional protocol, a phase in merging HTML into a XML. So we have plenty of changes to look forward to, like removal of the <img> tag in XHTML2 ;)

W3c.org has a good faq page for this topic as well: