xxxxxxxxxx
<div id="test">
<p>First paragraph.</p>
<p>Second paragraph.</p>
</div>
<div id="test_only_child">
<p>Only child</p>
</div>
<style>
div#test_only_child p:only-of-type {
font-weight: bold;
}
div#test p:first-of-type {
text-decoration: underline;
}
div#test p:last-of-type {
color: red;
}
</style>