Journal ·
How to Apply CSS Class Only To First Child of An Element or Division
Written in 2015. Some steps may have changed since.
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.