DEV Community

Code_Regina
Code_Regina

Posted on • Updated on

|CSS| CSS: The Very Basics

          -What is CSS
-Color and Background-Color Properties
-Color Systems: RGB and Named Colors
-Color Systems: Hexadecimal
-Common Text Properties
-Font Size Basics with Pixels
Enter fullscreen mode Exit fullscreen mode




What is CSS

CSS is a language for describing how documents are presented visually - how they are arranged and styled.
CSS stands for cascading style sheets.
CSS uses Rules.

Color and Background-Color Properties

The color CSS property sets the foreground color value of an element text and text decorations.

The background color property sets the background color value of an element text and text decorations.

Color Systems: RGB and Named Colors

CSS has specific names for colors that can be used and memorized.
However, the colorful names may be limited in scope. To gain access to even more colors an RGB system is in place.
It is possible to pick up to 3 color values for red, green and blue to make up colors to use for web pages.

Color Systems: Hexadecimal

It is possible to use hexadecimals to create colors in CSS.
Hex uses red, green, and blue channels similar to RGB color system.
Each ranges from 0-255 but the colors are represented with hexadecimal values that are combined with 0-9 and A-F.

Common Text Properties

text-decoration sets the appearance of decorative lines-height sets the height of a line box. It is commonly used to set the distance between lines of text.

Font Size Basics with Pixels

Changing the font-size with CSS sets the size of the font. Changing the font size also updates the size of the font size-relative length units such as em, ex and so forth.

There are relative and absolute values to change the font size.

Relative em, rem,vh,vw,%, and moar
Absolute px, pt, cm, in, mm

Absolute Units are absolute because they are the end result, px are the most used. It is not recommended for responsive websites.

Top comments (0)