Standards for developing flexible, durable, and sustainable HTML and CSS.
All code in any code base should look like a single person typed it, no matter how many people contributed.
This means strictly enforcing these agreed upon guidelines at all times. For additions or contributions, please file an issue on GitHub.
- Use soft-tabs with two spaces
- Nested elements should be indented once (2 spaces)
- Always use double quotes, never single quotes
- Don't include a trailing slash in self-closing elements
Incorrect example:
<!DOCTYPE html> <html> <head> <title>Page title</title> </head> <body> <img src='http://github.com/images/company-logo.png' alt='Company' /> <h1 class='hello-world'>Hello, world!</h1> </body> </html>
Correct example:
<!DOCTYPE html> <html> <head> <title>Page title</title> </head> <body> <img src="http://github.com/images/company-logo.png" alt="Company"> <h1 class="hello-world">Hello, world!</h1> </body> </html>
Heavily inspired by Idiomatic CSS and the GitHub Styleguide.
Designed and built with all the love in the world by @mdo.