Here is the original HTML:
HTML Code:
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<TITLE> css test</TITLE>
<style type="text/css">
body {
background-color: black; 
p {
color: #0000FF;
.sidebar { 
p.sidebar a:link, p.sidebar a:visited {
font-weight: bold;
color: white;
color: green;
<p class="sidebar"> white text group 1,
<h3> <a href="link.html"> and so will this link. </a>Other text has what color</h3>
<p class="sidebar"> white text group 2,
<span> <a href="link.html"> and so will this link. </a> Other text has what color</span>
<a href="">This is a normal link</a>;
Why the conextual selector works fine if it is within a span tag, but it does not work if a link is contained by a heading tag?

Thank you!