title: difference in css styling between <ul> > <li> and <ul> <li>
body: <p>What is the difference in css styling between <code>divClass &gt; ul &gt; li &gt; a</code> and <code>divClass ul li a</code> basically I am trying to style an anchor tag which is in li and li belongs to ul of course and ul is inside a div and div class name is classDiv, I have done some basic research and I have tried in both ways but not working yet, here is html</p>
  
  <pre><code>&lt;div class="classDiv"&gt;            
          &lt;ul&gt;                
              &lt;li class="abc"&gt;google.com&lt;/li&gt;                
          &lt;/ul&gt;                            
      &lt;/div&gt;
  </code></pre>
  
  <p>and css</p>
  
  <pre><code>.classDiv &gt; ul &gt; li &gt; a:hover{    
  color: green;
  background-color: skyblue;
  cursor: pointer;    
  }
  </code></pre>