# Path: htmlgen/element.py
# class Element(NonVoidElement):
# 
#     """Base generator for HTML elements with children.
# 
#     This includes most elements, like <body>, <div>, <span>, <strong>, etc.
# 
#         >>> link = Element("a")
#         >>> link.set_attribute("href", "http://www.example.com/")
#         >>> link.append("Test Link")
#         >>> str(link)
#         '<a href="http://www.example.com/">Test Link</a>'
# 
#     append() and extend() escape reserved HTML characters in string, but
#     not in sub-generators:
# 
#         >>> span = Element("span")
#         >>> span.add_css_classes("my-css")
#         >>> span.set_style("color", "red")
#         >>> span.append("Test & Test")
#         >>> str(span)
#         '<span class="my-css" style="color: red">Test &amp; Test</span>'
# 
#     append_raw() and extend_raw() do not do any escaping. Do not use these
#     methods with strings from untrusted sources!
# 
#         >>> span = Element("span")
#         >>> span.append_raw("Test<br/>Test")
#         >>> str(span)
#         '<span>Test<br/>Test</span>'
# 
#     Instead of appending children to elements, the generate_children()
#     method can be overwritten. This is generally preferred for element
#     sub-classes that are not meant to be extended by users, since it avoids
#     constructing the HTML tree in memory.
# 
#         >>> class MyElement(Element):
#         ...     def generate_children(self):
#         ...         yield "Hello, "
#         ...         child = Element("strong")
#         ...         child.append("World!")
#         ...         yield child
#         >>> str(MyElement("div"))
#         '<div>Hello, <strong>World!</strong></div>'
# 
#     """
# 
#     def __init__(self, element_name):
#         super().__init__(element_name)
#         self.children = HTMLChildGenerator()
# 
#     def __bool__(self):
#         return True
# 
#     def __getattr__(self, item):
#         return getattr(self.children, item)
# 
#     def __len__(self):
#         """Return the number of children.
# 
#         A sub-generator is counted as one child.
# 
#         """
#         return len(self.children)
# 
#     def __nonzero__(self):
#         return True
# 
#     def generate_children(self):
#         """Return an iterator over the children of this element.
# 
#         This method can be overridden by sub-classes.
# 
#         """
#         return self.children


from htmlgen.element import Element


class Division(Element):
    """An HTML division (<div>) element.

    <div> elements are block-level elements without semantic meaning. They are
    containers for styling or scripting.

        >>> div = Division("Initial text. ")
        >>> div.id = "my-block"
        >>> div.add_css_classes("important", "legal")
        >>> div.append("This is more text.")
    """

    def __init__(self, *content):
        super().__init__("div")
        self.extend(content)



# Path: htmlgen/element.py
# class Element(NonVoidElement):
# 
#     """Base generator for HTML elements with children.
# 
#     This includes most elements, like <body>, <div>, <span>, <strong>, etc.
# 
#         >>> link = Element("a")
#         >>> link.set_attribute("href", "http://www.example.com/")
#         >>> link.append("Test Link")
#         >>> str(link)
#         '<a href="http://www.example.com/">Test Link</a>'
# 
#     append() and extend() escape reserved HTML characters in string, but
#     not in sub-generators:
# 
#         >>> span = Element("span")
#         >>> span.add_css_classes("my-css")
#         >>> span.set_style("color", "red")
#         >>> span.append("Test & Test")
#         >>> str(span)
#         '<span class="my-css" style="color: red">Test &amp; Test</span>'
# 
#     append_raw() and extend_raw() do not do any escaping. Do not use these
#     methods with strings from untrusted sources!
# 
#         >>> span = Element("span")
#         >>> span.append_raw("Test<br/>Test")
#         >>> str(span)
#         '<span>Test<br/>Test</span>'
# 
#     Instead of appending children to elements, the generate_children()
#     method can be overwritten. This is generally preferred for element
#     sub-classes that are not meant to be extended by users, since it avoids
#     constructing the HTML tree in memory.
# 
#         >>> class MyElement(Element):
#         ...     def generate_children(self):
#         ...         yield "Hello, "
#         ...         child = Element("strong")
#         ...         child.append("World!")
#         ...         yield child
#         >>> str(MyElement("div"))
#         '<div>Hello, <strong>World!</strong></div>'
# 
#     """
# 
#     def __init__(self, element_name):
#         super().__init__(element_name)
#         self.children = HTMLChildGenerator()
# 
#     def __bool__(self):
#         return True
# 
#     def __getattr__(self, item):
#         return getattr(self.children, item)
# 
#     def __len__(self):
#         """Return the number of children.
# 
#         A sub-generator is counted as one child.
# 
#         """
#         return len(self.children)
# 
#     def __nonzero__(self):
#         return True
# 
#     def generate_children(self):
#         """Return an iterator over the children of this element.
# 
#         This method can be overridden by sub-classes.
# 
#         """
#         return self.children


# Path: htmlgen/block.py
from htmlgen.element import Element



class Division(Element):
    """An HTML division (<div>) element.

    <div> elements are block-level elements without semantic meaning. They are
    containers for styling or scripting.

        >>> div = Division("Initial text. ")
        >>> div.id = "my-block"
        >>> div.add_css_classes("important", "legal")
        >>> div.append("This is more text.")
    """

    def __init__(self, *content):
        super().__init__("div")
        self.extend(content)



class Paragraph(Element):