1 Reply Latest reply on Aug 18, 2011 6:02 PM by LatNWarrior

    HTML5 with CS4; What is Best Doc Type?

    LatNWarrior Level 1

      I am preparing to create HTML5 business site in Dreamweaver CS4. I downloaded the HTML5 support extension but what doc type do I setup in preferences?

      I know I just delete the startup code Dreamweaver starts me up; but is it best to change the default doc type to specific HTML4.01 or HTML4.01 transitional going forward?

       

      Presently out of work looking to make a little money so cannot upgrade to CS5.5 right now...

        • 1. Re: HTML5 with CS4; What is Best Doc Type?
          LatNWarrior Level 1

          Got the answer to my question and wanted to share for those that still use CS4....

           

          Now to answer your question about getting HTML5 functionality in Dreamweaver CS4:

           

          Don Booth wrote an extension that adds HTML5 code hint functionality to Dreamweaver CS4 so you get code hints for HTML5 documents:

           

          The HTML5 Pack for Dreamweaver CS3 and CS4:

          http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=2188522

           

          Download and install that extension.

           

          To add the HTML document type, however, you need to modify the file named MMDocumentTypeDeclarations.xml. Here’s how to do that:

           

          1. Find the configuration folder then navigate to the documenttypes folder. The Configuration folder can be found under the folder where you installed Dreamweaver.

          2. Find and make a backup copy of MMDocumentTypeDeclarations.xml (MMDocumentTypeDeclarations.xml.bak)

          3. Open MMDocumentTypeDeclarations.xml in your favorite text editor. If anything goes wrong, you can always get back to the default state by replacing your changes with the backup copy.

          4. Go to the end of the document and find the </documenttypedeclarations> tag and add the following lines just before the </documenttypedeclarations> tag:

           

          <documenttypedeclaration id="mm_html_5">

          <title>

          HTML5

          </title>

          <doctypedecl>

          <![CDATA[<!DOCTYPE HTML>]]>

          </doctypedecl>

          <rootelement>

          <![CDATA[<html></html>]]>

          </rootelement>

          <dtdcontext>html</dtdcontext>

          <dtdcontext>html5</dtdcontext>

          <dtdcontext>frameset_frame</dtdcontext>

          <dtdcontext>xslt</dtdcontext>

          </documenttypedeclaration>

           

           

          5. Save the document

          6. Restart Dreamweaver

           

          You should now have an HTML5 document type option when you create a new document.

           

          There was an issue with Dreamweaver CS4 that needed to be fixed in code to fully support HTML5 documents which is why upgrading to CS5 was recommended. In CS4, Dreamweaver’s definition of a well formed HTML document has a meta content type which isn’t required for HTML5 documents so, no matter what we do to CS4, any HTML document created by CS4 will have the following:

           

          <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

           

          Replace that line with this:

           

          <meta charset=utf-8">

           

          You’ll need to do this every time you create a new HTML5 document.

           

          Once you finish go to Preferences New Document and select HTML5 as default Doc Type...

           

          Thanks to:

          What I did was create a snippit of the meta and added it to my snippit's meta folder

          Jeff Booher

          Dreamweaver Engineering