css

CSS Basics

Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language like HTML.

Display Property

Display is CSS's most important property for controlling layout. Every element has a default display value depending on what type of element it is. The default for most elements is usually block or inline. A block element is often called a block-level element. An inline element is always just called an inline element.

Centering Objects

Horizontal Alignment

Vertical Alignment

Transforms, Transitions, and Animations

Transforms allow you to move, rotate, scale, and skew elements. The following are transform properties:

Transitions: A transition is an animation, just one that is performed between two distinct states - i.e. a start state and an end state. Like a drawer menu, the start state could be open and the end state could be closed, or vice versa.

Animations: If you want to perform something that does not specifically involve a start state and an end state, or you need more fine grain control over the keyframes in a transition, then you've got to use an animation.

CSS Layout (float, flex, grid)

Elements are surrounded by greater and less than angle brackets, e.g. <div>

Tags are composed of both the angle brackets and element, e.g. <div>

Opening tags look like <div>