On 1/1/19 1:49 PM, Gavin Smith wrote:
Thanks for working on this. What else needs to be changed so that the
output is valid for HTML 5? I assume that the DOCTYPE declaration would
need to be changed - currently it is
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
The recommendation seems to be just plain:
<!DOCTYPE html>
See
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Introduction_to_HTML5
Something that isn't directly tied to HTML5, but would be nice,
and it might make sense to tie it to the same customization variable
is "polyglot markup" - i.e. make some tweaks to make the HTML valid as XML:
https://www.w3.org/TR/html-polyglot/
Maybe use HTML_VERSION="html5-polyglot" for that?
This mostly affects "empty" elements. For example:
<img src="foo.jpg">
should be:
<img src="foo.jpg"/>
However, elements that are not defined as empty, but just happen to have no
children
must have a full closing tag to be valid as both HTML and XML:
<a name="foo"></a>
--
--Per Bothner
[email protected] http://per.bothner.com/