I’m not sure about a site that does it. There are any number of linters out there that will validate you code - jslint, jshint, others
You can add these as a plugin to your code editor. Codepen has one built in that will provide feedback on your code quality.
Personally, I’d start with looking at the Codepen one - it’s available in the drop-down on the JS editor; just select ‘Analyze JS’
<button onclick="document.getElementById('player').volume=1.0;player.paused ? player.play() :player.pause()"></button>
Not that I have ever heard of. It may exist, but I can’t see any mileage on anyone spending time on creating it - there isn’t a market for it, as the vast majority of developers just don’t code that way.
no because they are two different languages and so whichever one you are validating the other one will be invalid.
Inline code is antiquated and hasn’t been needed since Netscape 4.
With proper security headers in place on the hosting no inline scripts will run - you will just get a security violation error.
This works: When I removed a question mark or a period, it told me error.
The document is valid HTML5 + ARIA + SVG 1.1 + MathML 2.0 (subject to the utter previewness of this service).
How are these different from each other?
The one that rejected the inline junk is validating properly - the other one isn’t.
The one that rejected the junk is the official standards validator - the other one has no official standing and could have been written by anyone to validate anything.
I removed a period and a question mark from the code.
This One Found Errors: This one said the code was not written properly.
This One Found No Errors: This one said the code was written properly
I tried the other one again, and it made corrections. So, I guess they both do then.
What do you mean?
the nu/ shouldn’t be there
When it comes to the English language, a dictionary will tell you if you’ve spelled the word correctly, whereas a grammar checker will help you to figure out if your words make sense in context with each other.
The validator is equivalent to a dictionary, whereas a linter is more like a grammar checker, and a teacher of the native language can give you the best advice of all of them.
I take it that you are satisfied just with the validator?
Al I care about is if the code is written correctly.
If all of these characters are in the right spots.
[quote=“asasass, post:17, topic:230015, full:true”]
Al I care about is if the code is written correctly.[/quote]
Correctly according to the validator, the linter, or the helpers here on the forum?
the linter doesn’t do that at all.
Linters are a code quality tool.
Some linters do a better job than others. For example, jslint is so harsh in its criticism that it brings grown men to tears.