Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/css/selectors/combinator-selectors/child-selector.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ sidebar_position: 2
tags: [selector, combinator, child]
description: "Child selector is used to select an element that is a direct child of another element."
keywords: [child selector, css child selector, css selector, css combinator, css child combinator]
hide_table_of_contents: true
---

In CSS, the child selector is used to select an element that is a direct child of another element. The child selector is represented by the `>` character between two selectors.

<AdsComponent />
<br />

## Syntax

Expand Down Expand Up @@ -58,6 +60,7 @@ The child selector is more specific than the descendant selector and less specif
:::

<AdsComponent />
<br />

## Example: Using Child Selector

Expand Down Expand Up @@ -164,4 +167,3 @@ In the above example, the CSS rule will apply the color `red` to the text inside
- [Parent Selector](#): The parent selector selects an element that is a direct parent of another element.
- [Ancestor Selector](#): The ancestor selector selects an element that is an ancestor of another element.
- [Universal Selector](#): The universal selector selects all elements in a document.
-