code: def tagToString(self):
          
          def is_el_without_params():
              return not self.params and "=" not in self._element
  
          if not self.isTag() or self.isComment() or is_el_without_params():
              return self._element
  
          output = "<" + str(self._tagname)
  
          for key in self.params:
              output += " " + key + "=\"" + escape(self.params[key], '"') + "\""
  
          return output + " />" if self._isnonpairtag else output + ">"
docs: Get HTML element representation of the tag, but only the tag, not the
          :attr:`childs` or :attr:`endtag`.
  
          Returns:
              str: HTML representation.