My goal is to target specific occurrences of a certain type of element in CSS for styling purposes.
Consider the following example:
<span>Some random stuff</span>
<p>Occurrence 1 of p</p>
<ul>
<li>Random stuff</li>
<li>More random stuff</li>
</ul>
<p>Occourence 2 of p</p>
<span>Even more random stuff</span>
I aim to style Occurrence 1 and 2 of 'p' differently using an external CSS file. I understand that it may be simpler to use inline CSS, but my requirement is to achieve this externally. Additionally, while I could assign unique IDs or classes to each occurrence of 'p', I want to explore if there's another approach without resorting to that method.