2 ms·
They are allowed due to the big push for XHTML in the past and making them invalid might cause problems for a ton of sites built that way. However, the slash c
by assimpleaspossi 3y ago
They are allowed due to the big push for XHTML in the past and making them invalid might cause problems for a ton of sites built that way.
However, the slash carries no meaning. It does nothing. And browsers are instructed to ignore it. If anything, it can only cause problems: https://github.com/validator/validator/wiki/Markup-%C2%BB-Void-elements#trailing-slashes-directly-preceded-by-unquoted-attribute-values https://github.com/validator/validator/wiki/Markup-%C2%BB-Vo...