Code Guide is a set of standards for developing consistent, flexible, and sustainable HTML and CSS. It comes from years of experience writing code on projects of all sizes. It's not the end-all be-all, but it's a start. Don't capitalize tags, including the doctype. Use soft tabs with two spaces, they're the only way to guarantee code renders the same in any environment. Nested elements should be indented once (two spaces). Always use double quotes, never single quotes, on attributes. Don't include a trailing slash in self-closing elements, the HTML5 spec says they're optional. Don’t omit optional closing tags (e.g. </li> or </body>). Enforce standards mode and more consistent rendering in every browser possible with this simple doctype at the beginning of every HTML page. Authors are encouraged to specify a lang attribute on the root html element, giving the document's language. This aids speech synthesis tools to determine what pronunciations to use.
Features
- IE compatibility mode
- Character encoding
- Syntax
- HTML5 doctype
- Language attribute
- Boolean attributes
- And many more