Topic: CSS Basics

Select a child – CSS

Preview

To select an immediate child of an HTML element, use 2 selectors separated by a greater than sign:

.class-name > p {}

To view this and the other 300+ tutorials on Simple Dev, sign up for a 10-day free trial.