pico
pico copied to clipboard
Invalid HTML5
Since this useful framework relies on native HTML, it would be good to use formally correct HTML in the documentation and examples.
The following facts are relatively unknown or ignored:
In HTML, a void element must not have an end tag. For example, `<input type="text"></input>` is invalid HTML.
Self-closing tags (<tag />) do not exist in HTML.
Source: https://developer.mozilla.org/en-US/docs/Glossary/Void_element
It's all over the documentation. Void elements seem to always be self closing in the docs.
I assume the reason for this is that void elements are not valid XML syntax, so if you use a XML templating language like JSX / TSX, then this is how things should look :D
I don't think it confuses anyone. Browsers won't break because of this, so you just have to be aware that in html certain elements are void elements. The rest is just syntax preference.