title: Access figcaption and img through figure id
body: <p>I really wanted to find this out alone... sorry for asking this question. I just started getting into HTML, CSS and JavaScript.</p>
  
  <p>I want to access my figure's <code>img</code> and <code>figcaption</code> only through the figure's <code>id</code>.</p>
  
  <pre><code>&lt;div id="grid"&gt;
      &lt;figure id="hg"&gt;
          &lt;img src="sml1.png"/&gt;
          &lt;figcaption&gt;0&lt;/figcaption&gt;
      &lt;/figure&gt;   
  &lt;/div&gt;
  </code></pre>
  
  <p>I tried it with <strong><code>document.getElementById("hg").children</code></strong>, but that doesn't seem to work for me. Maybe I'm using it wrong?</p>
  
  <p>Is what I want to do even possible? I don't really want to give the img and figcaption elements an <code>id</code> attribute.</p>