There are two similar concepts: self-closing elements and void elements. In HTML there are only void elements (so elements without the end tag). If some element is not void, it needs an end tag. The script is not void and that's why it needs an end tag.
The situation is different in XML, which allows any element to be self-closing (so having one tag that will be treated as a start and end tag at the same time). If you want to use self-closing elements, you can always serve your site with application/xhtml+xml MIME type. However it would have all the consequences of serving XML (e.g. draconian error handling). The other solution could be to use some templating engine that uses XML as an input, but generates HTML.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There are two similar concepts: self-closing elements and void elements. In HTML there are only void elements (so elements without the end tag). If some element is not void, it needs an end tag. The
script
is not void and that's why it needs an end tag.The situation is different in XML, which allows any element to be self-closing (so having one tag that will be treated as a start and end tag at the same time). If you want to use self-closing elements, you can always serve your site with
application/xhtml+xml
MIME type. However it would have all the consequences of serving XML (e.g. draconian error handling). The other solution could be to use some templating engine that uses XML as an input, but generates HTML.