<style> | |
#target { font-family: ahem; font-size: 50px; background-color: green; height: 50px; width: 50px; } | |
#target:first-letter { color: red; } | |
</style> | |
<div id="target">Lorem</div> | |
<script> | |
var target = document.getElementById("target"); | |
target.offsetTop; | |
var text = target.firstChild; | |
target.innerHTML = "ipsum"; | |
target.removeChild(target.firstChild); | |
</script> |