Reference Code Standard
- Google’s HTML guide
- The Code Guide also provides excellent guidance for developing consistent, flexible, and sustainable HTML.
Implementing the Standard
We recommend using HTMLHint. You can install this as a plugin for your IDE or for the command-line:
Example .htmlhintrc
:
{
"alt-require": true,
"attr-no-duplication": true,
"attr-unsafe-chars": true,
"attr-value-double-quotes": false,
"attr-value-not-empty": false,
"doctype-first": true,
"doctype-html5": true,
"head-script-disabled": false,
"href-abs-or-rel": false,
"html-lang-require": true,
"id-class-ad-disabled": true,
"id-class-value": false,
"id-unique": false,
"inline-script-disabled": false,
"inline-style-disabled": false,
"spec-char-escape": false,
"src-not-empty": true,
"style-disabled": false,
"tag-pair": false,
"tag-self-close": false,
"tagname-lowercase": true,
"title-require": true
}
Was this page helpful?
Thanks for your feedback!