First read why coding style matters.
Examples of other good coding styles and best practices:
Indentation
- We use tabs to indent code. Indent by one tab at the time.
Capitalization
- Use lowercase, e.g.
<table>in HTML,#ccccccfor colors in css
Trailing whitespace
- Remove trailing white space (even when on an empty line). Why is trailing space such a big issue anyway?
Newline at the end of a file
- Always add a newline at the end of any file you edit. Why, you ask?
Naming
- Always close tags.
- Tables shouldn't be used for page layout.
- Always use quotes around attributes in a tag.
<p class="headline" data-attribute="106">This is my paragraph of special text.</p>
- Indent CSS code.
- Don’t use inline css.
- Never edit framework css files (e.g. bootstrap). Override styles in your custom css file.
- Always use semicolons.
- unless specifically mentioned otherwise, we basically follow the Style Guide for Python Code
- when importing from the same module, it's ok to use the following syntax
from module import class, another, many