dominate 2.1.6

`Dominate` is a Python library for creating and manipulating HTML documents using an elegant DOM API.It allows you to write HTML pages in pure Python very concisely, which eliminates the need to learn another template language, and lets you take advantage of the more powerful features of Python.

Compatibility-------------

`Dominate` is compatible with both Python 2.7 and Python 3.3. There are known issues with Python 3.2 and below.

Installation------------

The recommended way to install `dominate` is with[`pip`](http://pypi.python.org/pypi/pip/):

All examples assume you have imported the appropriate tags or entire tag set (i.e. `from dominate.tags import *`).

Hello, World!-------------

The most basic feature of `dominate` exposes a class for each HTML element, where the constructoraccepts child elements, text, or keyword attributes. `dominate` nodes return their HTML representationfrom the `__str__`, `__unicode__`, and `render()` methods.

`Dominate` can also use keyword arguments to append attributes onto your tags. Most of the attributes are a direct copy from the HTML spec with a few variations.

Use `cls` for class names and `fr` for `for` in label elements. `cls` and `fr` are used because `class` and `for` in python are [reserved keyword](http://docs.python.org/2/reference/lexical_analysis.html#keywords "Reserved Keywords").

The decorated function will return a new instance of the tag used to decorate it, and execute in a `with` context which will collect all the nodes created inside it.

You can also use instances of tags as decorators, if you need to add attributes or other data to the root node of the widget.Each call to the decorated function will return a copy of the node used to decorate it.

You should notice that here the `head` tag contains zero children.This is because the default `title` tag is only added when the document is rendered and the `head` element does not explicitly contain one.

The `document` class also provides helpers to allow you to directly add nodes to the `body` tag.