title: Use jQuery/Javascript to create a list of all elements in a set
body: <p>I want to use Javascript to loop through a set of elements, and create a list of labels for each one, so if the set of elements were as follows:</p>
  
  <pre><code>&lt;h1&gt;Title&lt;/h1&gt;
  &lt;h2&gt;Subheading&lt;/h2&gt;
  &lt;p&gt;Paragraph of text...&lt;/p&gt;
  </code></pre>
  
  <p>It would give me the following:</p>
  
  <pre><code>&lt;ol&gt;
    &lt;li&gt;h1&lt;/li&gt;
    &lt;li&gt;h2&lt;/li&gt;
    &lt;li&gt;p&lt;/p&gt;
  &lt;ol&gt;
  </code></pre>
  
  <p>Is it possible for jQuery/Javascript to return an element's type as a string, and if so how would I go about it?</p>