title: Select only parent element of unordered list minus the sub list using css selectors?
body: <p>Just trying to style the first ul li a only without styling the sub ul li a.  I realize there is no such thing as parent selectors in CSS and proably for good reasons, so how would I accomplish this without assigning all of the li's a class?  Maybe this is impossible, which is why I am asking. Here is the HTML.</p>
  
  <pre><code>&lt;div id="myDiv"&gt;
      &lt;h2&gt;Headline 2&lt;/h2&gt;
  
      &lt;div&gt;
          &lt;p&gt;Some Paragraph 1&lt;/p&gt;
          &lt;ul class="list"&gt;
              &lt;li&gt;&lt;a href="#"&gt;List 1 Item 1 (=)&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;List 1 Item 2 (=)&lt;/a&gt;
                  &lt;ul&gt;
                      &lt;li&gt;&lt;a href="#"&gt;List 1 Item 2a&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="#"&gt;List 1 Item 2b&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;List 1 Item 3 (=)&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  
      &lt;p&gt;Some paragraph 2&lt;/p&gt;
      &lt;div&gt;
          &lt;ul&gt;
              &lt;li&gt;&lt;a href="#"&gt;List 2 Item 1&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;List 2 Item 2&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is what I would like to target
  <a href="https://i.stack.imgur.com/5l88K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5l88K.png" alt="enter image description here"></a></p>
  
  <p>Again, I realize I could just add classes to all of them and get the result I want, I just want to know if there is another way.  </p>
  
  <p>Using css selectors, here is how I could target the sublist (not what I want)</p>
  
  <pre><code>ul.list li &gt; ul li a{
     ...
  }
  </code></pre>
  
  <p>Targeting the first ul plus the sublist (not what I want)</p>
  
  <pre><code>ul.list &gt; li a{
     ...
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/5l88K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5l88K.png" alt="enter image description here"></a></p>
  
  <p>Here is a fiddle for you convience.<br>
  <a href="http://jsfiddle.net/94e2fo30/" rel="nofollow noreferrer">http://jsfiddle.net/94e2fo30/</a></p>