html is an alias for the default Docutils HTML writer.
The default may change with the development of HTML, browsers, Docutils, and the web. Currently, html is mapped to html4css1, it will become an alias for html5 in Docutils 2.0.
aliases: | html4, html |
---|---|
front-ends: | rst2html4.py, rst2html.py |
config: | [html4css1 writer] |
The HTML Writer module, docutils/writers/html4css1.py, was the first Docutils writer and up to release 0.13 the only official HTML writer.
The output conforms to the XHTML 1 Transitional specification. It does not validate as HTML 4.01 Transitional due to the closing of empty tags required in XML but not allowed in HTML 4. However, the output follows the HTML Compatibility Guidelines for proper rendering on most HTML user agents.
Correct rendering depends on a CSS style sheet. A reference style sheet, html4css1.css, is provided and used by default.
To support the Internet Explorer (with a market share of about 90% around 2002, the time this writer was written), documents contain some hard-coded formatting hints and are tagged as "text/html" (instead of "application/xhtml+xml"). [1]
[1] | Conformance to CSS 2.1 has been added in IE 8 (2009), support for XHTML in IE 9 (2011). |
front-end: | rstpep2html.py |
---|---|
config: | [pep_html writer] |
This is a special writer for the generation of Python Enhancement Proposals (PEPs). It inherits from html4css1 and adds some PEP-specific options, a style sheet and template. The front-end uses also a specialised reader.
alias: | s5 |
---|---|
front-end: | rst2s5.py |
config: | [s5_html writer] |
The s5 writer inherits from html4css1. It produces XHTML for use with S5, the “Simple Standards-based Slide Show System” by Eric Meyer. See Easy Slide Shows With reST & S5 for details.
aliases: | html5_polyglot |
---|---|
front-end: | rst2html5.py |
config: | [html5 writer] |
The html5_polyglot writer generates polyglot HTML [2] output, valid XML [3] that is compatible with HTML5. New features and elements are used if they are widely supported.
There is no hard-coded formatting information in the HTML document. Correct rendering of elements not directly supported by HTML depends on a CSS style sheet. The provided style sheet minimal.css defines required styling rules; responsive.css add optional rules for better legibility. Adaption of the layout is possible with custom style sheets. [3]
New in Docutils 0.13
[2] | see also Benefits of polyglot XHTML5 |
[3] | (1, 2) The validity of raw HTML and custom stylesheets must be ensured by the author. |
name | aliases | front-end | HTML version | CSS version |
---|---|---|---|---|
html4css1 | html4, html | rst2html4.py, rst2html.py | XHTML 1 Transitional | CSS 1 |
pep_html | rstpep2html.py | XHTML 1 Transitional | CSS 1 | |
s5_html | s5 | rst2s5.py | XHTML 1 Transitional | CSS 1 |
html5_polyglot | html5 | rst2html5.py | HTML5 | CSS 3 |
For additional alternatives, see the Docutils link list and the sandbox.
CSS Level 3 builds on CSS Level 2 module by module, using the CSS2.1 specification as its core.
Specifications: https://www.w3.org/Style/CSS/specs.en.html
Validator: http://jigsaw.w3.org/css-validator/