Batch XHTML 1.0 Strict to HTML5 conversion (browser-based and Dreamweaver extension)
JavaScript CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

XHTML 1.0 Strict to HTML5 batch conversion

I came across a situation where I needed to convert a bunch of XHTML 1.0 Strict documents (or snippets) to valid HTML5.
This tool automates the process.

Note that this will not add any new HTML5 elements/features to your pages.
It merely gets rid of deprecated XHTML 1.0 Strict elements/attributes or replaces them with conforming ones.


There are two "products" in here:

  1. Browser-based, drag-and-drop batch conversion:
    1. Download and extract the files. (or use the demo here)
    2. Visit index.html in Firefox 3.6+ (if you are using Chrome/Chromium, see note below)
    3. Drag/drop your valid XHTML 1.0 Strict files in the marked area.
    4. If everything goes according to plan you'll be asked to download a zip file containing the HTML5 equivalent of your files.
    5. For more information (or if the conversion failed), take a look at the "Output" area. Messages will be added there as the files are processed.
  2. Dreamweaver extension
    1. Open "dw-x2h.mxi" with the "Adobe Extension Manager"
    2. Access 'XHTML to HTML5' entry in the 'Commands' menu
    3. Select the folder containing your XHTML files
    4. Wait while DW converts the files
    5. At the end, you'll be left with an opened document containing notes and information on the conversion, if applicable.

What exacly does this do to my documents?

  • Replaces <acronym> with <abbr>
  • Replaces <big> with <span class="big">
  • Replaces <tt> with <span class="tt">
  • Removes @summary from <table>
  • Replaces @cellpadding/@cellspacing with a class (ex: class="cellpadding5" instead of cellpadding="5") on <table>
  • Removes @nohref from <area>
  • Removes @profile from <head>
  • Removes @archive, @classid, @codebase, @codetype, @declare, @standby from <object>
  • Removes @type and @valuetype from <param>
  • Removes @charset, @name, @rev and @shape from <a>
  • Removes @charset and @rev from <link>
  • Removes @abbr, @axis, @valid from <td> and <th>
  • Removes @scope from <td>
  • Removes @scheme from <meta>
  • Removes @longdesc from <img>


  • If you want to use this locally (file://) with Chrome/Chromium you need to start the browser with: --allow-file-access-from-files --allow-file-access Otherwise you'll get "Security error".
  • The tool has been tested with:
    • Firefox 3.6.21, 6.0.2, 7.0.1, 8.0.1
    • Chromium 14.0.835.186
    • Opera 11.50
    • Dreamweaver CS5

3rd Party

Using sax.js by Isaac Z. Schlueter as a JS SAX library:
Using jszip by Stuart Knightley:

Flattr this project

[Flattr this git repo]( 1.0 Strict to HTML5&language=&tags=github&category=software)