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

后端 未结 6 1193
走了就别回头了
走了就别回头了 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:14

    Not closing tags can lead to browser incompatibilities and improperly rendered pages. That alone should be enough reason to properly close your tags.

    Saving bandwidth and download time is a horrible excuse, if you ask me. It's 2011, and even on dialup the few bytes you save on not closing a few tags will not be even close to noticeable. A mangled page due to improper rendering, however, will be.

提交回复
热议问题