MCPcopy Create free account
hub / github.com/PageBot/PageBot / hgroup

Method hgroup

Lib/pagebot/contexts/htmlcontext/htmlbuilder.py:1032–1046  ·  view source on GitHub ↗

The hgroup method (HTML5) defines the heading of a section or a document. The hgroup element is used to group headers, h1 to h6 , where the largest is the main heading of the section, and the others are sub-headings. >>> b = HtmlBuilder()

(self, **args)

Source from the content-addressed store, hash-verified

1030 self._closeTag('figcaption')
1031
1032 def hgroup(self, **args):
1033 """The hgroup method (HTML5) defines the heading of a section or a
1034 document. The hgroup element is used to group headers, <tag>h1</tag>
1035 to <tag>h6</tag>, where the largest is the main heading of the section,
1036 and the others are sub-headings.
1037
1038 >>> b = HtmlBuilder()
1039 >>> b.compact = True
1040 >>> b.hgroup()
1041 >>> b.addHtml('Hello world')
1042 >>> b._hgroup()
1043 >>> b.getHtml()
1044 '<hgroup>Hello world</hgroup>'
1045 """
1046 self.write_tag('hgroup', True, args)
1047
1048 def _hgroup(self):
1049 self._closeTag('hgroup')

Callers

nothing calls this directly

Calls 1

write_tagMethod · 0.80

Tested by

no test coverage detected