Why are the "a
tags" classified as descendants and not children? They look like they could be children rather than descendants. However, both lines of code below affect them the same way.
<p class="note">
This page was written by
<a href="mailto:ivy@example.com">ivy@example.com</a>
<a href="http://www.example.com</a>
</p>
When I use the child selector:
p a {
color: green;
}
a
tags are green
When I use the descendant selector:
p > a {
color: green;
}
a
tags are green
What makes a descendant a descendant and a child a child?