Skip to content

Dev.Coding Standard HTML

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

Note

Selected Rules

  • Omit the protocol from embedded resources: <script src="//www.google.com/js/gweb/analytics/autotrack.js"></script> ?
  • Use only lowercase for HTML/CSS element names/attributes/values (unless text/CDATA): color: #e5e5e5; ?
  • Remove trailing white spaces. ?
  • 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; However 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. ?
  • Abandoned: Indent by 2 spaces at a time. ? -> ?

Amended Rules

  • Use tabs for indentation: length of 4 spaces. ? | ?
Clone this wiki locally