Fetching contributors…
Cannot retrieve contributors at this time
22 lines (16 sloc) 629 Bytes

HTML Style Guide


  • Use UTF-8 encoding.
  • Indents are four spaces.
  • Lowercase element names, attribute names, and attribute values.
  • Lines with nothing on them should have no whitespace.
  • There should be no whitespace at the end of a line.
  • HTML5 doctype, valid document where possible.
  • XML style - ie, all elements must close.


  • Ues a new line for every block, list or table element.
  • Indent child elements.

Separation of concerns

  • Avoid style attributes and other inline CSS.
  • Avoid the javascript pseudo protocol.
  • Avoid event handler attributes such as onclick.