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

后端 未结 6 2088
清酒与你
清酒与你 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:37

    The Google Style Guide for HTML recommends omitting all optional tags.
    That includes , , ,

    and

  • .

    https://google.github.io/styleguide/htmlcssguide.html#Optional_Tags

    For file size optimization and scannability purposes, consider omitting optional tags. The HTML5 specification defines what tags can be omitted.

    (This approach may require a grace period to be established as a wider guideline as it’s significantly different from what web developers are typically taught. For consistency and simplicity reasons it’s best served omitting all optional tags, not just a selection.)

    
    
    
      
        Spending money, spending bytes
      
      
        

    Sic.

    Saving money, saving bytes

    Qed.

提交回复
热议问题