lxml.html.LabelElement

lxml :: html :: LabelElement :: Class LabelElement |
[hide private]
[frames] | no frames]

# Class LabelElement

source code

        object --+
                 |
    etree._Element --+
                     |
     etree.ElementBase --+
                         |
            object --+   |
                     |   |
             HtmlMixin --+
                         |
               HtmlElement --+
                             |
                            LabelElement

Represents a `<label>` element.

Label elements are linked to other elements with their `for` attribute. You can access this element with `label.for_element`.

Instance Methods | [hide private]
Inherited from `HtmlElement`: `cssselect` Inherited from `etree.ElementBase`: `__init__`, `__new__` Inherited from `etree._Element`: `__contains__`, `__copy__`, `__deepcopy__`, `__delitem__`, `__getitem__`, `__iter__`, `__len__`, `__nonzero__`, `__repr__`, `__reversed__`, `__setitem__`, `addnext`, `addprevious`, `append`, `clear`, `extend`, `find`, `findall`, `findtext`, `get`, `getchildren`, `getiterator`, `getnext`, `getparent`, `getprevious`, `getroottree`, `index`, `insert`, `items`, `iter`, `iterancestors`, `iterchildren`, `iterdescendants`, `iterfind`, `itersiblings`, `itertext`, `keys`, `makeelement`, `remove`, `replace`, `set`, `values`, `xpath` Inherited from `etree._Element` (private): `_init` Inherited from `HtmlMixin`: `drop_tag`, `drop_tree`, `find_class`, `find_rel_links`, `get_element_by_id`, `iterlinks`, `make_links_absolute`, `resolve_base_href`, `rewrite_links`, `text_content` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]
| for_element Get/set the element this label points to. Return None if it can't be found.
Inherited from `etree._Element`: `attrib`, `base`, `nsmap`, `prefix`, `sourceline`, `tag`, `tail`, `text` Inherited from `HtmlMixin`: `base_url`, `body`, `classes`, `forms`, `head`, `label` Inherited from `object`: `__class__`

Property Details | [hide private]

### for_element Get/set the element this label points to. Return None if it can't be found. Get Method: unreachable.for_element(self) - Get/set the element this label points to. Return None if it can't be found. Set Method: unreachable.for_element(self, other) Delete Method: unreachable.for_element(self)