What are the actual problems of not closing tags and attributes in HTML

后端 未结 6 1053
走了就别回头了
走了就别回头了 2021-01-11 15:44

Recently a friend decided not to close his tags or attributes in HTML because it\'s not required and he\'ll save some bandwidth and download time. I told him it\'s a bad ide

6条回答
  •  生来不讨喜
    2021-01-11 16:21

    Not closing tags can create unexpected blank spaces between elements in the markup.

    Consider the following example.

    
    
    
    
    

    Lorem ipsum dolor sit amet.

    Lorem ipsum dolor sit amet.

    Lorem ipsum dolor sit amet.

    Lorem ipsum dolor sit amet.

提交回复
热议问题