Re: Can't detect error from this code.

> This Code has an error. The body opening tag is missing but the w3 validator can't detect this error. please check your system and resolve the issue thank you.

Some tags in HTML are optional, including the “body” start tag. That means, these tags can be omitted, and that the validator is correct.

See https://html.spec.whatwg.org/multipage/syntax.html#optional-tags for details on optional tags, as per the HTML spec.

See https://meiert.com/en/blog/optional-html/ for an overview of optional markup (from my own site, but I know of no similar overview).

Best,

 Jens.

--
Jens Oliver Meiert
https://meiert.com/en/ · https://mas.to/@j9t

Received on Saturday, 26 November 2022 11:49:25 UTC