How to Apply CSS Class Only To First Child of An Element or Division
This article is from our archive. It is kept as it was first written, so some steps or versions may be out of date.
This paragraph is the first child of it's parent.
This paragraph is not the first child of it's parent.
This paragraph is not the first child of it's parent.
This paragraph is not the first child of it's parent.
Here is the output of the code:
This paragraph is the first child of it's parent.
This paragraph is not the first child of it's parent.
This paragraph is not the first child of it's parent.
This paragraph is not the first child of it's parent.