bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: modernizing html output


From: Per Bothner
Subject: Re: modernizing html output
Date: Tue, 1 Jan 2019 14:10:11 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

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
address@hidden   http://per.bothner.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]