Skip to content

rtraction/html-css-code-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Code Guide

Standards for developing flexible, durable, and sustainable HTML and CSS.

Table of contents

Golden rule

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.

HTML

HTML syntax

  • 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>

CSS

Copy


Thanks

Heavily inspired by Idiomatic CSS and the GitHub Styleguide.

Designed and built with all the love in the world by @mdo.

About

Standards for developing flexible, durable, and sustainable HTML and CSS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published