Updated generate_string function to better handle html output.

The new "html" output from the ```generate_string``` function will now
have lowercase tags, as this is the convention for writing html tags.
Also included "html" in the text displayed during an exception. This
fixes issue #264.
Merge pull request #267 from omaciel/issue-264

Updated generate_string function to better handle html output.