- There's some issue but adding one more example can help,
p:nth-last-child(3) selects the third-to-last <p> element within its parent.'
- a warning can also be added so case syntax error
Also here the problem/question here is staged for :Nth Type Selector
Nth-of-Type Selector
Select an element based on its occurrence among siblings of the same type.
:nth-of-type(A)
Targets elements of the same type by their position within a parent, counting from the start. Similar to :nth-child, but it only considers siblings of the same type, not all child elements.
Example
p:nth-of-type(3)
This selects the third <p> element within its parent.
p:nth-last-child(3)selects the third-to-last<p>element within its parent.'Also here the problem/question here is staged for :Nth Type Selector
Nth-of-Type Selector
Select an element based on its occurrence among siblings of the same type.
:nth-of-type(A)Targets elements of the same type by their position within a parent, counting from the start. Similar to
:nth-child, but it only considers siblings of the same type, not all child elements.Example
p:nth-of-type(3)This selects the third
<p>element within its parent.