The img tag defines an image. The img tag has no block. To avoid compatibility problems between browser with the default border value, it is set to 0 if not defined. http://www.w3schools.com/tags/tag_img.asp >>> b = HtmlBuilder() >>> b.compact = True
(self, **args)
| 1464 | self._closeTag('canvas') |
| 1465 | |
| 1466 | def img(self, **args): |
| 1467 | """The img tag defines an image. The img tag has no block. |
| 1468 | To avoid compatibility problems between browser with the default border value, |
| 1469 | it is set to 0 if not defined. |
| 1470 | http://www.w3schools.com/tags/tag_img.asp |
| 1471 | |
| 1472 | >>> b = HtmlBuilder() |
| 1473 | >>> b.compact = True |
| 1474 | >>> b.img(src="myImage.png", cssClass="myClass", width="100%") |
| 1475 | >>> b.getHtml() |
| 1476 | '<img class="myClass" src="myImage.png"/>' |
| 1477 | """ |
| 1478 | if not args.get('border'): |
| 1479 | args['border'] = 0 |
| 1480 | self.write_tag('img', False, args) |
| 1481 | |
| 1482 | def map(self, name): |
| 1483 | self.write('<map name="%s">' % name) |
no test coverage detected