Matches an E element, that is the only sibling of its type. (Source: W3C)
<div>
<div>Lorem ipsum dolor sit amet, consectetur</div>
<p>Lorem ipsum dolor sit amet, consectetur</p>
<div>Lorem ipsum dolor sit amet, consectetur</div>
</div>
p:only-of-type{font-style:italic}
Lorem ipsum dolor sit amet, consectetur
In the example, the second line of text should be set in italics as it is the only p
-element in its parent element.