code: def to_html(self):
          
          if self.text is None:
              return
  
          level = self.level
          if level > 6:
              level = 6
          return '<h%s%s><a id="%s"></a>%s%s</h%s>' % (
              level,
              self.html_attributes(),
              self.element_id,
              self.html_icon(),
              self.text.to_html(),
              level)
docs: Render a Heading MessageElement as html
  
          :returns: The html representation of the Heading MessageElement.
          :rtype: str