Style Guide

A styling guide of rules to keep in mind when styling a web page.

Style guide {#style-guide}

Here are the coding rules and principles used throughout the course:

This chapter is by nature subjective and opinionated. Feel free to make your own choices.

Naming

Naming things right goes a long way into making code cleaner and easier to understand. Some general naming rules are presented below.

1. Choose meaningful names

The most important rule is to give each element (variable, function, class, etc) a specific name that reflects its role. A variable holding the value of a circle radius should be named radius rather than num or myVal. ...