Does HTML5 allow non-empty self-closing tags?
P粉680487967
P粉680487967 2023-08-21 18:20:11
0
2
540

The W3C validator (Wikipedia) does not like the use of self-closing tags (tags ending in "/>") on non-empty elements. (Empty elements are those that never contain any content.) Are they still valid in HTML5?

Some examples of accepted empty elements:


Some examples of rejected non-empty elements:

    P粉113938880
      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!