Title: Contextual Selectors example
Course: Intermediate Web Programming (25436)

Contextual selectors are very selective.

This example shows how to target a specific tag using the document hierarchy.

Tags only need to be descendants in the order stated in the selector; other tags can be in between and the selector still works.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Contextual Selectors example</title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Language" content="en-us" />
<style type="text/css">
em {color:green;}
 </style>
</head>
<body>
  <h1>Contextual selectors are <em>very</em> selective.</h1>
  <p>This example shows how to target a <em>specific</em> tag
    using the document hierarchy.</p>
  <p>Tags only need to be descendants <span>in the <em>order stated</em>
  in the selector</span>; other tags can be in between and the selector still works.</p>
</body>
</html>