meta-example.html has problem
modoojunko opened this issue · comments
I follow the steps
and add <script> and <style>
I can not get same result like that.
So I checked. the console gives this error
I found some pages that said <script> should be after the body.
I tried it works.
In the meta-example.html there has "defer". It means after HTML body loaded , load this.
<script src="script.js" defer></script>
My point is this, learn page does not include what is defer means.
could you add this defer information on MDN learn page? (https://developer.mozilla.org/zh-CN/docs/learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML)
the javascipt is not find the body' label when it happened .
you can try to use the way after.
document.querySelector('body')
// not document.body, I think
let it try.