What's the difference between HTML <head> and <body> tags?

后端 未结 8 941
庸人自扰
庸人自扰 2021-01-31 09:19

What\'s the difference between HEAD tags and BODY tags?

most HTML books only \'briefly\' mentions and tags...but they

8条回答
  •  猫巷女王i
    2021-01-31 09:55

    A HTML file has headers and a "body" (payload) — just like a HTTP request.

    The encapsulates the contents of the document, while the part contains meta elements, i.e., information about the contents. This is (typically) title, encoding, author, styling etc.

    As for your question about JavaScript: In general JavaScript is evaluated as it is (loaded and) parsed. So, if you embed JavaScript in the section it should be parsed immediately.

提交回复
热议问题