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)
| 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') |
no test coverage detected