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

后端 未结 8 938
庸人自扰
庸人自扰 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条回答
  •  暖寄归人
    2021-01-31 09:55

    http://www.w3schools.com/js/js_whereto.asp

    You can place an unlimited number of scripts in your document, and you can have scripts in both the body and the head section at the same time.

    It is a common practice to put all functions in the head section, or at the bottom of the page. This way they are all in one place and do not interfere with page content.

    The main difference in head and body scripts is that usually people who prefer functions use javascript in the whereas people who prefer inline practices will mostly use it below the document.

    Functional

    
    
    
    
    
    
    
    

    My First Web Page

    Inline

    
    
    

    My First Web Page

提交回复
热议问题