Code Inspections in HTML
This topic lists all DataGrip code inspections available in HTML.
You can toggle specific inspections or change their severity level on the Editor | Inspections page of settings Ctrl+Alt+S.
Accessibility
Inspection | Description | Default Severity |
---|---|---|
Missing associated label | Reports a form element ( | Warning |
Missing required 'alt' attribute | Reports a missing | Warning |
Missing required 'lang' attribute | Reports a missing | Warning |
Missing required 'summary' attribute | Reports a missing | |
Missing required 'title' attribute | Reports a missing title attribute | |
Missing required 'title' element | Reports a missing | Warning |
Other inspections
Inspection | Description | Default Severity |
---|---|---|
Reports empty tags that do not work in some browsers. Example:
<html>
<script/>
</html>
After the quick-fix is applied:
<html>
<script></script>
</html>
| Warning | |
Reports an HTML non-boolean attribute without a value. Suggests configuring attributes that should not be reported. | Warning | |
Reports contents of Example:
<script type="text/javascript">
console.log('<');
</script>
After the quick-fix is applied:
<script type="text/javascript">
console.log('<');
</script>
| Error | |
Mismatched image size | Reports a | Warning |
Reports an HTML element without a closing tag. Some coding styles require that HTML elements have closing tags even where this is optional. Example:
<html>
<body>
<p>Behold!
</body>
</html>
After the quick-fix is applied:
<html>
<body>
<p>Behold!</p>
</body>
</html>
| No highlighting, only fix | |
Reports a missing mandatory attribute in an XML/HTML tag. Suggests configuring attributes that should not be reported. | Warning | |
Obsolete attribute | Reports an obsolete HTML5 attribute. | Warning |
Obsolete tag | Reports an obsolete HTML5 tag. Suggests replacing the obsolete tag with a CSS or another tag. | Warning |
Presentational tag | Reports a presentational HTML tag. Suggests replacing the presentational tag with a CSS or another tag. | |
Reports redundant closing tags on empty elements, for example, Example:
<html>
<body>
<br></br>
</body>
</html>
After the quick-fix is applied:
<html>
<body>
<br>
</body>
</html>
| Warning | |
Reports an unknown HTML attribute. Suggests configuring attributes that should not be reported. | Warning | |
Reports an unknown HTML tag. Suggests configuring tags that should not be reported. | Warning | |
Reports an unresolved file in a link. | Warning | |
Reports an unresolved last part of an URL after the | Warning | |
Unresolved web link | Reports an unresolved web link. Works by making network requests in the background. | |
Reports an incorrect HTML attribute value. | Warning |