When not using inline styles (via the style attribute), CSS code typically looks something like this:
p {
font-family: sans-serif;
text-align: center;
}This code is formatted to be more readable. Theoretically, you could also write it like this:
p {font-family: sans-serif;text-align: center;}But of course such kind of code is way harder to understand and maintain, hence we typically go for the more readable version.
Here are a couple of conventions about CSS code formatting, which you should keep in mind:
The selector (p in the above example) and the opening curly brace typically go into the same line
You then have one CSS property + its value per line
Every line MUST end with a semi-colon
The lines are indented (automatically, via the "Format Document" shortcut or because you pressed the TAB key on your keyboard)
The closing curly brace goes into a separate line, with no indentation