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)
| 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') |