forked from pi-engine/pi
-
Notifications
You must be signed in to change notification settings - Fork 0
Dev.Coding Standard HTML
Taiwen Jiang edited this page Jul 14, 2013
·
13 revisions
- Refer to Google HTML/CSS Coding Standard for details.
- Use HTML 5: HTML5 (HTML syntax) is preferred for all HTML documents
<!DOCTYPE html>
. ?
- 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. ? -> ?