title: How can I extract all the HTML tags from a page. Not the data between the tags
body: <p>Sorry if it’s a newbie question. I’ve been googling for an hour and I also checked several questions on this site but I can’t seem to figure it out. </p>
  
  <p>I’m trying to extract all the HTML tags (elements) from a few different pages. I don’t need the data between the HTML tags. I only need the tags that are being used, comments, etc. </p>
  
  <p>So the output I’m looking for is whatever is between &lt;> I guess. As an example, if the code is </p>
  
  <pre><code>&lt;head&gt; title &lt;/head&gt;
  &lt;body id=“body text”&gt; blah blah blah &lt;/body&gt;
  </code></pre>
  
  <p>I’d like the output to be:</p>
  
  <pre><code>&lt;head&gt; &lt;/head&gt;
  &lt;body id=“body text”&gt; &lt;/body&gt;
  </code></pre>
  
  <p>Thanks a lot in advance and sorry if it’s a silly question. </p>