html.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Mon, 22 Feb 2016 12:46:36 +0200
changeset 1905 fba288d59662
parent 1697 f41d35f4af39
child 1912 8b81a8f0f692
permissions -rw-r--r--
Include only local subsections into TOC. This prevent duplication of TOC when build single page HTML document. Also this make unnecessary CSS hack to hide document title as top level section.

.. -*- coding: utf-8; -*-
.. include:: HEADER.rst

=======
 HTML.
=======
.. contents::
   :local:

Disable quirk mode.
===================
::

  <!DOCTYPE HTML>

Page encoding.
==============

Place in HEAD tag (CHARSET is one among of defined by
http://www.iana.org/assignments/character-sets)::

  <meta http-equiv="Content-Type" content="text/html; charset=CHARSET">

or in HTML 5::

  <meta charset="utf-8">

See:

  http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2

Center an object.
=================

To center block-level element::

  <div style="margin-left: auto; margin-right: auto; position: relative; width: 700px;">
    <div>SOME</div>
  </div>

To center inline element::

  <p style="text-align: center;">TEXT</p>

Browser support.
================

  * http://htmlbook.ru/
  * http://www.quirksmode.org/