<style> | |
.greenFirstLetter:first-letter { color: green; } | |
</style> | |
<p> | |
All the X’s below should be green. All other letters should be black. | |
</p> | |
<div class="greenFirstLetter"> | |
XY | |
</div> | |
<div class="greenFirstLetter"> | |
<img>YZ | |
</div> | |
<div class="greenFirstLetter"> | |
<img align="left">XY | |
</div> | |
<div class="greenFirstLetter"> | |
<div style="position: absolute; left: 100px;">VW</div>XY | |
</div> | |
<div class="greenFirstLetter"> | |
<div> | |
<div style="position: absolute; left: 100px;">VW</div>XY | |
</div> | |
</div> | |
<div class="greenFirstLetter"> | |
<div> | |
<img> | |
<div style="position: absolute; left: 100px;">VW</div>YZ | |
</div> | |
</div> |