GithubHelp home page GithubHelp logo

Comments (1)

sideshowbarker avatar sideshowbarker commented on June 10, 2024

The violation in the spec applies to the parsed document in the DOM and not to any pre-parsed source markup.

And the HTML checker operates on the parsed document in the DOM, not on the source markup.

See more at #1668 (comment)

To put that in other words: Your source markup represents instructions to the HTML parser — and this instruction:

<p data-FOO="foo">

…to an HTML parser means exactly the same thing at this instruction:

<p data-foo="foo">

And in both cases, what the HTML parser creates in the DOM is <p data-foo="foo">.
That is, an HTML parser reads the markup data-FOO="foo" as meaning data-foo="foo".

To clarify a bit further — to an HTML parser, this markup:

<!DOCTYPE HTML>
<HTML LANG="en">
<HEAD>
<TITLE>Test</TITLE>
</HEAD>
<BODY>
<P DATA-FOO="FOO">correct??</P>
</BODY>
</HTML>

…means exactly the same thing as this markup:

<!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>
</head>
<body>
<p data-FOO="foo">correct??</p>
</body>
</html>

And in fact to an HTML parser the following:

<!DOCTYPE html>
<html lang=en>
<title>Test</title>
<p data-FOO=foo>correct??</p>

… is also exactly the same thing as those above.

from validator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.