Last updated 2017-08-09
Best practices
Learn HTML best practices and coding styles
Learn HTML best practices and coding styles
For writing maintainable and scalable HTML documents
&
, <
, >
, "
, and '
with named character referencesdata-*
, Microdata, and RDFa Lite attributes with common attributestitle
elementbase
elementfavicon.ico
title
attribute to alternate stylesheetslink
elementtype
attribute for CSSstyle
elementpre
elementblockquote
elementblockquote
elementtype
attribute for ol
elementdl
for dialoguefigcaption
element as first or last child of figure
elementmain
elementdiv
element as much as possibledownload
attribute for downloading a resourcerel
, hreflang
, and type
attribute if neededem
element for warning or cautions
, i
, b
, and u
element as much as possibleq
elementtitle
attribute to abbr
elementruby
element verboselydatetime
attribute to non-machine-readable time
elementclass
attribute prefixed with language-
kbd
element as simple as possiblespan
element as much as possiblebr
elementbr
element only for presentational purposelabel
elementfor
attribute if possibletype
attribute for input
elementvalue
attribute to input type="submit"
title
attribute to input
element when there is pattern
attributeplaceholder
attribute for labelingoption
element per linemax
attribute to progress
elementmin
and max
attribute to meter
elementlegend
element as the first child of fieldset
elementRead more on https://github.com/hail2u/html-best-practices