lunes, 20 de octubre de 2014

Google style guide

Ir order to write good code you need to know the  formatting and style guidelines for CSS code from the Google style guide. These guidelines help you write code that's easy to read and easy to fix.

The code below has correct basic style:

<style>
html {
  background-color: lightYellow;
}

li {
  font-family: 'Trebuchet MS', sans-serif;
}

h1 {
  color: blue;
}
</style>

The rules are:

CSS Formatting Guide

  1. Put 1 space before the {
  2. Put 2 spaces before property names
  3. Put 1 space before property values
  4. Put a ; after property values
  5. A blank line separates each CSS rule
*The above rules has taken from www.codeavengers.com


It is very importan to write good code, so don't forget these rules.

No hay comentarios:

Publicar un comentario