Is it necessary to write HEAD, BODY and HTML tags?

后端 未结 6 2146
清酒与你
清酒与你 2020-11-22 05:10

Is it necessary to write , and tags?

For example, I can make such a page:



        
6条回答
  •  日久生厌
    2020-11-22 05:47

    Firebug shows this correctly because your Browser automagically fixes the bad markup for you. This behaviour is not specified anywhere and can (will) vary from browser to browser. Those tags are required by the DOCTYPE you're using and should not be omitted.

    The html element is the root element of every html page. If you look at all other elements' description it says where an element can be used (and almost all elements require either head or body).

提交回复
热议问题