Sample HTML
<div id=”content”>
<h1> Heading Here </h1>
<p> Lorem ipsum dolor sit amet. </p>
<p>Lorem ipsum dolor <a href=”#”>sit</a> amet.</p>
<div>
<div id=”nav”>
<ul>
<li><a href=”#”>Item 1</a></li>
<li><a href=”#”>Item 2</a></li>
<li><a href=”#”>Item 3</a></li>
</ul>
</div>
<div id=”footer”>
Lorem ipsum dolor <a href=”#”>sit</a> amet.
</div>
</body>
Descendant Selectors
Descendant selectors are used to selected elements that are descendants of another element
For example, in the HTML sample shown above, three <a> elements are descendants of the <li> elements. To target these three <a> elements only, and not all other <a> elements, a descendant selector can be used. This selector targets any <a> element that is nested inside an <li> element.
color:green;
}
Descendant selectors do not have to use direct descendant elements. For example, the <a> element is a descendant of <div id=”nav”> as well as the <li> element. This means that #nav a can be used as a selector as well.
color: red;
}
Descendant selectors also can include multiple levels of descendants to be more specific.
color: green;
}
Helpful Articles
Steve Present Weight Loss: The 2 Secrets Of Weight Loss Success
2 Unusual Facts About Rapid And Lasting Weight Loss Success: In order to achieve lasting results, you MUST change your inner weight controller: Your subconscious mind...
Diabetic Renal Diet for CKD Patients Diet
Diabetic Renal Diet Guidelines Made Easy! Being that one of the most common extrarenal diseases affecting the kidney is diabetes mellitus, diabetic renal diet has become a topic of interest nowadays...
The Lemonade Diet
There are many people who have the primary goal of weight loss and they turn to the lemonade diet to lose weight quickly...
Tags: CSS, descendant, h1, h2, How To, id, rules, selectors, tags, Tutorials
There often obviously a lot to know about this. I think you created some really points in Features also.