HTML5ify (also fix UTF-8 encoding)

Bring up to modern HTML5 standards, which as a side effect ensures proper handling of UTF-8 encoding.