Skip to content

Dev.Coding Standard HTML

Taiwen Jiang edited this page Jul 13, 2013 · 13 revisions

Note

Selected rules

  • Omit the protocol from embedded resources: <script src="//www.google.com/js/gweb/analytics/autotrack.js"></script> ?
  • Indent by 2 spaces at a time. ?
  • Use only lowercase for HTML/CSS element names/attributes/values (unless text/CDATA): color: #e5e5e5; ?
  • Do not close void elements, i.e. write <br>, not <br />. ?
  • Do not omit optional tags: It is optionally suggested to omit optional tags in Google guide, for compliance considerations we don't implement this rule.?
  • Omit type attributes for style sheets and scripts. ?
  • Use a new line for every block, list, or table element. ?
  • Use double ("") rather than single quotation marks ('') around attribute values. ?
Clone this wiki locally