You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not valid HTML. The browser will act like the closing tag doesn't exist, like so:
<div>
And vscode will correctly mark it as wrong like so:
But many html-like languages like Vue and JSX do allow self-closing tags, but vscode still marks it as wrong. It would be nice if we could allow all tags to be self-closed by setting a value in .vscode\settings.json
The text was updated successfully, but these errors were encountered:
The example you gave would cause an error in React because the DOM property is className, not class. JSX is not HTML, but an XML-like extension to JS that is processed into library code or DOM API calls.
Meanwhile, Vue allows for templates to be embedded in HTML, in which case they have to follow HTML syntax, and XML self-closing semantics do not apply in HTML as you pointed out (well, outside of foreign elements, like SVG).
The example you gave would cause an error in React because the DOM property is className, not class. JSX is not HTML, but an XML-like extension to JS that is processed into library code or DOM API calls.
Meanwhile, Vue allows for templates to be embedded in HTML, in which case they have to follow HTML syntax, and XML self-closing semantics do not apply in HTML as you pointed out (well, outside of foreign elements, like SVG).
This is not valid HTML. The browser will act like the closing tag doesn't exist, like so:
And vscode will correctly mark it as wrong like so:

But many html-like languages like Vue and JSX do allow self-closing tags, but vscode still marks it as wrong. It would be nice if we could allow all tags to be self-closed by setting a value in
.vscode\settings.json
The text was updated successfully, but these errors were encountered: