title: How to select element within a div using DOM?
body: <p>I'm learning DOM and I'm trying to select an li within a div, where the div has an ID of 'essentials'
  I want to target all li within that div and change the background color. I was able to change the background color of the div itself, but can't seem to select just the li. Here's my code:</p>
  <p>HTML</p>
  <pre><code>    &lt;ul&gt;
        &lt;li&gt;milk&lt;/li&gt;
        &lt;li class=&quot;selected&quot;&gt;honey&lt;/li&gt;
        &lt;li&gt;water&lt;/li&gt;
        &lt;li&gt;wine&lt;/li&gt;
        &lt;li&gt;beer&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  </code></pre>
  <p>Javascript</p>
  <pre><code>document.getElementById('essentials').style.backgroundColor = 'yellow';
  </code></pre>