-
Notifications
You must be signed in to change notification settings - Fork 3
HTML Hint showcase #19
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"tag-pair": true, | ||
"attr-value-double-quotes": true, | ||
"doctype-first": true, | ||
"id-unique": true | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<html> | ||
<head> | ||
<title>Bad Page<title> | ||
</head> | ||
<body> | ||
<h1>Welcome | ||
<img src="image.jpg"> | ||
<p>This paragraph is missing its closing tag | ||
<a href="about.html">About us | ||
<ul> | ||
<li>Item 1 | ||
<li>Item 2 | ||
</ul | ||
</body> | ||
</html> | ||
<html><body><h1>Oops<img src="a.png"></body></html> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Two complete HTML documents in one file – split or comment out. Line 16 embeds a second 🧰 Tools🪛 HTMLHint (1.5.0)[error] 16-16: Tag must be paired, missing: [ </h1> ], start tag match failed [ <h1> ] on line 16. (tag-pair) 🤖 Prompt for AI Agents
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document lacks DOCTYPE and several closing tags – HTMLHint will flag this.
Right now the first fragment violates every rule you just enabled:
<!DOCTYPE html>
before<html>
→doctype-first
.<title>
,<h1>
,<p>
,<a>
,<li>
tags →tag-pair
.</ul
(missing>
) → parsing error.Unless the goal is to demonstrate failing cases, consider fixing them so the file passes lint:
📝 Committable suggestion
🧰 Tools
🪛 HTMLHint (1.5.0)
[error] 1-1: Doctype must be declared before any non-comment content.
(doctype-first)
[error] 3-3: Tag must be paired, missing: [ </title></title> ], start tag match failed [ <title> ] on line 3.
(tag-pair)
[error] 12-12: Tag must be paired, missing: [
], start tag match failed [(tag-pair)
🤖 Prompt for AI Agents