Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stray doctype error. #34

Closed
Electricz0 opened this issue Apr 11, 2023 · 3 comments
Closed

Stray doctype error. #34

Electricz0 opened this issue Apr 11, 2023 · 3 comments

Comments

@Electricz0
Copy link

Electricz0 commented Apr 11, 2023

Currently, the extension (only version 1.3.0) is telling me that truly valid HTML is actually invalid. I keep getting errors that seem to indicate that the HTML from my file is getting wrapped inside the body of another HTML file before being validated, so a bunch of stray tag errors show up. See below to get an idea of what I mean.

HTML code such as this:

<!DOCTYPE HTML>
<html lang="en">
<head>
    <title>Untitled</title>
</head>
<body>
	
</body>
</html>

Will get errors like this:

html_validator_errors

Even though the official validator will say this:

2023-04-11 16_09_31-Showing results for contents of text-input area - Nu Html Checker — Mozilla Fire

@avimalhotra
Copy link

Facing same issue. Extension is showing errors but actually there are no issues.

Screenshot 2023-05-01 at 7 00 04 PM

@avimalhotra
Copy link

avimalhotra commented May 14, 2023

Got the solution.
Just replace doctype with DOCTYPE.
The problem is with doctype is lowercase.

works perfectly. Screenshot 2023-05-14 at 2 00 01 PM

@celian-rib celian-rib changed the title Valid HTML showing as invalid. Stray doctype error. Sep 29, 2023
@celian-rib celian-rib pinned this issue Sep 29, 2023
@AdeVedA
Copy link

AdeVedA commented Oct 16, 2024

Sorry to comeback on the subject, (it may be another problem) but none of my html files are recognized as valid (whereas W3C Web Validator works fine on css).
Notification tells "Not an HTML or CSS file.". The tested html files are using django 5.1.1 and bootstrap 5.3.3, i tried on base html and partials, none are told to be html files (but well... they are indeed ! and "!DOCTYPE html" is not lowercase). Did i miss something ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants