Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid HTML5 #537

Open
Rotzbua opened this issue May 7, 2024 · 1 comment · May be fixed by #538
Open

Invalid HTML5 #537

Rotzbua opened this issue May 7, 2024 · 1 comment · May be fixed by #538

Comments

@Rotzbua
Copy link

Rotzbua commented May 7, 2024

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

@Atmos4
Copy link

Atmos4 commented Jun 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants