HtmlTagBlock
Overview
HtmlTagBlock is a class in Aspose.Words FOSS for Python.
Inherits from: Block.
A raw HTML tag, block-level or inline (Markdig’s HtmlBlock /
``HtmlInline``, folded into one node here).
This class provides 4 methods for working with HtmlTagBlock objects in Python programs.
Available methods include: __init__, add_child, get_parent.
All public members are accessible to any Python application after installing the Aspose.Words FOSS for Python package.
Properties: block_level, children, heading_tag_level, is_cell, is_closing, is_first_child, and 12 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
is_known | bool | Read | Gets the is known. |
is_para_or_heading | bool | Read | Gets the is para or heading. |
is_table | bool | Read | Gets the is table. |
is_cell | bool | Read | Gets the is cell. |
heading_tag_level | int | Read | Gets the heading tag level. |
tag_name | `` | Read | Gets the tag name. |
raw_text | `` | Read | Gets the raw text. |
is_self_closing | `` | Read | Gets the is self closing. |
is_closing | `` | Read | Gets the is closing. |
is_self_contained | `` | Read | Gets the is self contained. |
is_first_child | bool | Read | Gets the is first child. |
is_last_child | bool | Read | Gets the is last child. |
next_sibling | Optional["Block"] | Read | Gets the next sibling. |
previous_sibling | Optional["Block"] | Read | Gets the previous sibling. |
block_level | MarkdownBlockLevel | Read | Gets the block level. |
type | `` | Read | Gets the type. |
parent | Optional["Block"] | Read | Gets the parent. |
children | list["Block"] | Read | Gets the children. |
Methods
| Signature | Description |
|---|---|
__init__(tag_name: str, raw_text: str, is_self_closing: bool, is_closing: bool, is_self_contained: bool) | Calls init(tag_name, raw_text, is_self_closing, is_closing, is_self_contained) on this HtmlTagBlock instance. |
__init__(block_type: BlockType) | Calls init(block_type) on this HtmlTagBlock instance. |
add_child(child: "Block") → "Block" | Calls add_child(child) on this HtmlTagBlock instance. |
get_parent() → Optional["Block"] | Walk up the ancestor chain and return the first block whose |
``type`` is one of *types*, or ``None`` if none matches. |