.htmlhintrc
HTML Hint configuration file
.htmlhintrc
Validate
Check your file against this schema
Opens the validator with this schema already loaded. Paste your
.htmlhintrc and it validates in your browser — nothing is uploaded.
Reference
Fields
Generated directly from the schema, following local
$refs, to two levels of nesting.
| Field | Type | Description |
|---|---|---|
alt-require | boolean | Alt of img must be present and alt of area[href] and input[type=image] must be set value. default: false |
attr-lowercase | anyOf | Attribute name must be lowercase. default: false |
attr-no-duplication | boolean | The same attribute can't be specified twice. default: false |
attr-sorted | boolean | Attributes should be sorted in an order. default: false |
attr-unsafe-chars | boolean | Attribute value cannot use unsafe chars. default: false |
attr-value-double-quotes | boolean | Attribute value must be closed by double quotes. default: false |
attr-value-no-duplication | anyOf | Class attributes should not contain duplicate values. Other attributes can be checked via configuration. default: false |
attr-value-not-empty | boolean | Attribute must set value. default: false |
attr-value-single-quotes | boolean | Attribute value must be closed by single quotes. default: false |
attr-whitespace | boolean | No leading or trailing spaces inside attribute values. default: false |
button-type-require | boolean | The type attribute of a button element must be present with a valid value: button, submit, or reset. default: false |
doctype-first | boolean | Doctype must be first. default: false |
doctype-html5 | boolean | Doctype must be HTML5. default: false |
frame-title-require | boolean | A frame or iframe element must have an accessible name. default: false |
form-method-require | boolean | The method attribute of a form element must be present. default: false |
h1-require | boolean | A H1 heading element is required in HTML documents. default: false |
head-script-disabled | anyOf | The script tag cannot be used in head. default: false |
href-abs-or-rel | anyOf | Href must be absolute or relative. default: false |
html-lang-require | boolean | The lang attribute of an <html> element must be present and should be valid. default: false |
id-class-ad-disabled | boolean | Id and class cannot use ad keyword, it will be blocked by adblock software. default: false |
id-class-value | anyOf | Id and class value must meet some rules: underline, dash, hump. default: false |
id-unique | boolean | ID attributes must be unique in the document. default: false |
inline-script-disabled | boolean | Inline script cannot be used. default: false |
inline-style-disabled | boolean | Inline style cannot be used. default: false |
link-rel-canonical-require | boolean | A link element with rel="canonical" is required within the <head> tag. default: false |
main-require | boolean | A main element is required within the <body> tag. default: false |
meta-charset-require | boolean | A meta charset is required within the <head> tag. default: false |
meta-description-require | boolean | A meta description is required within the <head> tag. default: false |
meta-viewport-require | boolean | A meta viewport is required within the <head> tag. default: false |
space-tab-mixed-disabled | anyOf | Spaces and tabs cannot be mixed in front of line. default: false |
spec-char-escape | boolean | Special characters must be escaped. default: false |
src-not-empty | boolean | Src of img(script,link) must set value. Empty of src will visit current page twice. default: false |
style-disabled | boolean | Style tag cannot be used. default: false |
tag-no-obsolete | boolean | Disallows the use of obsolete HTML tags. default: false |
tag-pair | boolean | Tag must be paired. default: false |
tag-self-close | boolean | The empty tag must be self-closed. default: false |
tagname-lowercase | boolean | Tagname must be lowercase. default: false |
tagname-specialchars | boolean | Tagname must not contain any characters beside letters, numbers, ”-”, ”:” or ”_”. default: false |
tags-check | boolean | Check if particular tags are self-closing or must include or exclude particular tags. default: false |
title-require | boolean | title must be present in head tag. default: false |
Audit
What we found in this schema
- Declared draft: draft-07
- Validates cleanly against its own meta-schema.
- 40 properties, 100% carrying a description, max nesting depth 6.
Standards
Specification sections for the keywords in this schema
| Keyword | Document | Section |
|---|---|---|
$id | JSON Schema Core, draft 2020-12 | §8.2.1 — The "$id" Keyword |
$schema | JSON Schema Core, draft 2020-12 | §8.1.1 — "$schema" |
anyOf | JSON Schema Core, draft 2020-12 | §10.2.1.2 — "anyOf" |
const | JSON Schema Validation, draft 2020-12 | §6.1.3 — "const" |
default | JSON Schema Validation, draft 2020-12 | §9.2 — "default" |
description | JSON Schema Validation, draft 2020-12 | §9.1 — "title" and "description" |
enum | JSON Schema Validation, draft 2020-12 | §6.1.2 — "enum" |
items | JSON Schema Core, draft 2020-12 | §10.3.1.2 — "items" |
properties | JSON Schema Core, draft 2020-12 | §10.3.2.1 — "properties" |
type | JSON Schema Validation, draft 2020-12 | §6.1.1 — "type" |
Documents
- JSON Schema Core, draft 2020-12 — JSON Schema: A Media Type for Describing JSON Documents, A. Wright, H. Andrews, B. Hutton, G. Dennis, Eds., 2022. draft-bhutton-json-schema-01. An expired Internet-Draft with no formal standing in the IETF standards process; it is nonetheless the specification of record for JSON Schema 2020-12, published by json-schema.org.
- JSON Schema Validation, draft 2020-12 — JSON Schema Validation: A Vocabulary for Structural Validation of JSON, A. Wright, H. Andrews, B. Hutton, Eds., 2022.
- RFC 8259 (STD 90) — The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray, Ed., 2017. The format a schema describes.
- RFC 6901 — JavaScript Object Notation (JSON) Pointer. Defines the pointer syntax used by $ref fragments and the ~0 / ~1 escapes.
Source
Attribution
This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.