Descendent Selector(Space) is used to apply the properties of an element inside the element. Example- Select all <p> tags inside <div> tags.

<!-- Descendent Selector(element element)(div p):- Select all <p> elements inside <div> elements.-->
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Selectors with combinators</title>
    <style>
        div p {
            color: aqua;
            background-color: black;
        }
    </style>
</head>
<body>
    <div>
        <p>Inside div</p>
        <p>Inside div</p>
        <p>Inside div</p>
    </div>
    <div>
        <span>Span Element</span>
    </div>
    <p>Outer Paragraph from div</p>
</body>
</html>

Show Output :

Ele space ele Output
Related Topic :
Chemistry Formulas ListMaths Formulas List
What is LibreOffice? LibreOffice Impress Features ?LibreOffice Impress CCC Questions and Answer in Hindi 2022
CCC LibreOffice Calc Paper Questions with AnswersCCC NIELIT Quiz 2022
Interview Questions and Answers for ExperienceInterview Questions and Answers for Freshers
MCQ 
[social_share_button themes='theme1']

Leave a Comment