<style>
.green { color: green; }
</style>
<p>
    All the X&rsquo;s below should be green. All other letters should be black.
</p>
<div>
    <span class="green">X</span>Y
</div>
<div>
    <img>YZ
</div>
<div>
    <img align="left"><span class="green">X</span>Y
</div>
<div>
    <div style="position: absolute; left: 100px;">VW</div><span class="green">X</span>Y
</div>
<div>
    <div>
        <div style="position: absolute; left: 100px;">VW</div><span class="green">X</span>Y
    </div>
</div>

<div>
    <div>
        <img>
        <div style="position: absolute; left: 100px;">VW</div>YZ
    </div>
</div>
