HTML2JS (2009)

HTML2JS is a small open source cross-platform tool that generates JavaScript code from an HTML snippet, which when executed in a browser, creates DOM structures without using innerHTML.

Why not use innerHTML?

Microsoft’s Internet Explorer normalizes the HTML content when you use innerHTML. So if you want to avoid normalization you have to manually create the DOM using standardized DOM methods like appendChild.


java -jar HTML2JS-1.0.jar HTML [Identifier-Prefix]


  • HTML – is a HTML snippet which is XHTML 1.0 transactional compliant when inserted directly in a HTML document body
  • Identifier-Prefix – (Optional) The JavaScript identifier prefix to use. Defaults to “node” (see example below)

Note: The current directory must be the same as the jar file in order to locate the DTD directory.


java -jar HTML2JS-1.0.jar todo




coming soon


coming soon

One thought on “HTML2JS (2009)

  1. Pingback: IE Whitespace madness « Novak in Academia

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s