code: def handle_starttag(self, tag, attrs):
          
          if (tag in self.newline_before_elements):
              self.text += '\n'
          if (tag in self.stroke_before_elements and not
                  self.text.endswith(self.stroke_text)):
              # Put a stroke in front of every relevant element, if there is some
              # content between it and its predecessor
              self.text += self.stroke_text
          if tag == 'a':
              # If it's a link, append it to the link list
              for attr in attrs:
                  if attr[0] == 'href':
                      self.links.append((len(self.links) + 1, attr[1]))
docs: Handles every start tag like e.g. <p>.