Re: Nu Html Checker

 Settu, Senthil Kumar (senthilkumarsettu@toppanmerrill.com) wrote:

>
>
>
> I would like to highlight an issue “Nu Html Checker” with one of our xhtml
> file, please refer attached file. When we validate the file via W3C Markup
> validation service (https://validator.w3.org) it got passed without
> errors, whereas same file validated with errors in Nu Html Checker (
> https://validator.w3.org/nu), refer following error screenshot.
>
>
>
>
>
> Error : Bad value content-type for attribute http-equiv on XHTML element
> meta.
>
>
> I suppose you used file upload to validate the document. Then it will be
parsed using the XML parser and interpreted as XHTML.

When XML serialization is used for HTML documents, the following applies:
"The Encoding declaration state
<https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-content-type>
may
be used in HTML documents <https://dom.spec.whatwg.org/#html-document>, but
elements with an http-equiv
<https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv>
attribute
in that state must not be used in XML documents
<https://dom.spec.whatwg.org/#xml-document>."
https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-content-type

If the file is UTF-8 encoded with BOM, you can simply omit the tag. There
is no need to declare character encoding in that case, since UTF-8 with BOM
overrides anything you might set inside the document.

Jukka K. Korpela, http://jkorpela.fi

>

Received on Monday, 12 September 2022 07:57:08 UTC