# Descendent Selectors in CSS

JavascriptWeb DevelopmentFront End Scripts

Suppose you want to apply a style rule to a particular element only when it lies inside a particular element. As given in the following example, style rule will apply to <em> element only when it lies inside <ul> tag.

ul em {
color: #FFFF00;
}

Suppose now for <ol> element and style rule applied to <strong>:

ol strong {
color: #808000;
}
Published on 13-Apr-2018 07:14:15