Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<style>
div { color: red; }
div::first-line { color: green }
</style>
<div id="x"><span id="y">green</span></div>
<script>
x.offsetWidth;
var span = document.createElement('span');
span.textContent = 'This should be ';
y.insertBefore(span, y.firstChild);
</script>