code: def format(self, result):
          
          css = "\n".join(self.css)
          content = "{}{}".format(self._header(), self._body(result))
          if self._email:
              text = """<!DOCTYPE html>
              <html>
              <div width="100%" style="{sty}">{content}</div>
              </html>
              """.format(css=css, content=content, sty=self.styles["content"]["_"])
          else:
              text = """<html>
              <head><style>{css}</style></head>
              <body>{content}</body>
              </html>
              """.format(css=css, content=content)
          return text
docs: Generate HTML report.
  
          :return: Report body
          :rtype: str