I\'ve tried checking other answers, but I\'m still confused — especially after seeing W3schools HTML 5 reference.
I thought HTML 4.01 was supposed to \"allow\" singl
IMHO it is better to use the regular notation (
) instead of the forgiving notation (
) for the following reasons:
In your HTML there is probably some SVG and SVG only support the regular notation (e.g.
).
It is not a case that frameworks like React and NativeScript use an XML notation.
Your markup code will be easier to parse.
The regular notation is easier to read and understand, even late at night.
Both
and
are valid HTML tags.
If you use a full-fledged text editor configure it to use the regular notation (which is called XHTML by Emmet).
For instance, in Visual Studio Code you just have to add the following line to your settings:
"emmet.syntaxProfiles": {"html": "xhtml"}