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

Method h2

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

The `h1` to `h6` tags define headers. h1 defines the largest header. h6 defines the smallest header.:: self.h2(cssClass='head') ... self._h2() >>> b = HtmlBuil

(self, **args)

Source from the content-addressed store, hash-verified

795 self._h1()
796
797 def h2(self, **args):
798 """The `h1` to `h6` tags define headers. h1 defines the largest header. h6
799 defines the smallest header.::
800
801 <www href="http://www.w3schools.com/tags/tag_hn.asp" target="external"/>
802
803 self.h2(cssClass='head')
804 ...
805 self._h2()
806
807
808 >>> b = HtmlBuilder()
809 >>> b.compact = True
810 >>> b.h2()
811 >>> b.addHtml('Hello world')
812 >>> b._h2()
813 >>> b.getHtml()
814 '<h2>Hello world</h2>'
815 """
816 self.write_tag_noWhitespace('h2', True, args)
817
818 def _h2(self):
819 self._closeTag_noWhitespace('h2')

Callers 1

h2_Method · 0.95

Calls 1

Tested by

no test coverage detected