---
title: "Direct child selectors in css"  
description: "Direct child selectors in css"  
author: "E E Cummings"  
published: 2013-06-14  
updated: 2013-06-17  
canonical: https://www.mindstick.com/forum/1096/direct-child-selectors-in-css  
category: "css-css3"  
tags: ["css-css3"]  
reading_time: 1 minute  

---

# Direct child selectors in css

Hi [Expert](https://www.mindstick.com/articles/13120/an-expert-financial-advice-will-improve-your-finances),\
what is [direct](https://yourviews.mindstick.com/view/86744/elon-musk-launch-its-first-direct-to-cell-starlink-satellites) child [selectors](https://www.mindstick.com/interview/22831/what-is-the-use-of-selectors-in-objective-c) in [css](https://www.mindstick.com/forum/514/background-gradient-ie7-css-problem) and how to use this? Please [guide](https://www.mindstick.com/articles/44463/business-to-business-vat-reclaiming-a-guide-for-your-employees) me.\
Thanks in advance.

## Replies

### Reply by Anonymous User

Hi,\
Direct child selectors operate much like descendant selectors in that they also rely on an ancestral relationship to decide where to apply style. Descendant selectors, however, are more ambiguous because they apply to any descendant of an element; the descendant cab be a grandchild or a great-grandchild, or a great-great-grandchild, and so on. Direct child selectors apply only to immediate children of the element. \
e.g. \
p > span.inline-code {font-family: monospace;}


---

Original Source: https://www.mindstick.com/forum/1096/direct-child-selectors-in-css

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
