css <style type="text/css"> <!-- #elm1 .red p { color: red; } #elm1 a { color: pink;} #elm2 { color: blue;} #elm1 .red a { color: orange;} --> </style> html <div id="elm1"> <p class="red"> 普通の文字<br/> <a href="#">アンカー</a> <div id="elm2"> テスト </div><!-- div elm2 end --> </p> <a href="#">アンカー</a> </div><!-- div elm1 end -->