The figure method (HTML5) is used for annotating illustrations, diagrams, photos, code listings, etc. You can use the tag to associate a caption together with some embedded content, such as a graphic or video. You can use the tag in conjunction with the figcapti
(self, **args)
| 986 | self._h6() |
| 987 | |
| 988 | def figure(self, **args): |
| 989 | """The figure method (HTML5) is used for annotating illustrations, |
| 990 | diagrams, photos, code listings, etc. You can use the tag to associate |
| 991 | a caption together with some embedded content, such as a graphic or |
| 992 | video. You can use the tag in conjunction with the |
| 993 | <tag>figcaption</tag> element to provide a caption for the contents of |
| 994 | your <tag>figure</tag> element. |
| 995 | |
| 996 | >>> b = HtmlBuilder() |
| 997 | >>> b.compact = True |
| 998 | >>> b.figure() |
| 999 | >>> b.addHtml('Hello world') |
| 1000 | >>> b._figure() |
| 1001 | >>> b.getHtml() |
| 1002 | '<figure>Hello world</figure>' |
| 1003 | """ |
| 1004 | self.write_tag('figure', True, args) |
| 1005 | |
| 1006 | def _figure(self): |
| 1007 | self._closeTag('figure') |