css:
p {
color: red;
}
html:
<p id='h1'>asd</p>
<script>
var h1 = document.getElementById('h1');
</script>
why do I get an empty string when I type "h1.style.color" in the console?
css:
p {
color: red;
}
html:
<p id='h1'>asd</p>
<script>
var h1 = document.getElementById('h1');
</script>
why do I get an empty string when I type "h1.style.color" in the console?
asd
– AlexCode Feb 07 '18 at 10:42