body div > * can be described as "any element that is a child of a 'div' that is a descendant of the 'body' element." Describe the following selectors:
p.urgent.warningh1:first-childp:first-linep:first-child + * > tablebody:lang(en)input[type="text"]p[class]p[class="aside"]p[class~="aside"]p[class|="aside"]a[href] *a[href="http://www.w3.org/"][title="W3C-external"]div :first-child and div:first-child.
div :first-child is equivalent to div *:first-child-- it selects any element which is the first child of another element and is also a descendant of a div element. By contrast, div:first-child selects any div element that's the first child of another element.
Here are my rules:
a:link {color: blue;}a:visited {color: gray;}a:focus {background: #FF9;}a:hover {color: red; text-decoration: underline;}a:active {color: white; background: navy; font-weight: bold;}em elements will be boldfaced by the rule em:first-child {font-weight: bold;}?
strong element in the rant (try to use a different selector than in last week's quiz).div.rant strong:first-child {border: 1px solid black;}
div.footer a[href] {font-weight: bold;}
a[href="mailto:me@my.web.site"]:link {color: purple;}
ul > li a:hover {color: red;}
<body> <h1>Hel<strong>lo</strong> there!</h1> <p>Welcome to my Web site. I'm <em>so</em> glad you're here! On this site you can find: </p> <ul> <li><a href="mepics.html">Pictures of me</a></li> <li><a href="fluffpics.html">Pictures of my cat Fluffy</a></li> <li><a href="poetry.html">My poetry</a></li> <li><a href="favlinks.html">My <em>favorite</em> Web sites</a></li> </ul> <div class="rant"> <p> The other day someone wrote telling my site was lame. I <strong>hate</strong> that! After all, if you don't like the Web site, don't come here. I'm proud of my cat and there's nothing wrong with naming a mynx Fluffy anyway. </p> <p> So <em>there</em>. </p> </div> <p> If you want, e-mail me at <a href="mailto:me@my.web.site">me@my.web.site</a>, but <em>not</em> if you're going to complain. </p> <p>Have a nice day!</p> <div class="footer"> All content copyright <a href="mepics.html">me</a>, on the date I wrote it. </div> </body>