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

NameTypeAccessDescription
is_knownboolReadGets the is known.
is_para_or_headingboolReadGets the is para or heading.
is_tableboolReadGets the is table.
is_cellboolReadGets the is cell.
heading_tag_levelintReadGets the heading tag level.
tag_name``ReadGets the tag name.
raw_text``ReadGets the raw text.
is_self_closing``ReadGets the is self closing.
is_closing``ReadGets the is closing.
is_self_contained``ReadGets the is self contained.
is_first_childboolReadGets the is first child.
is_last_childboolReadGets the is last child.
next_siblingOptional["Block"]ReadGets the next sibling.
previous_siblingOptional["Block"]ReadGets the previous sibling.
block_levelMarkdownBlockLevelReadGets the block level.
type``ReadGets the type.
parentOptional["Block"]ReadGets the parent.
childrenlist["Block"]ReadGets the children.

Methods

SignatureDescription
__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. |

See Also