I am Ojoachele Onuh, I love technology because it makes life easier for me in many ways. It helps me explore my creativity by creating web applications that solve human problems.
WHAT IS CSS?
- CSS stands for cascading Style Sheets
- CSS describes how HTML elements are to be displayed on screen, paper, or in other media
- CSS saves a lot of work. It can control the layout of multiple web pages all at once
- External stylesheets are stored in CSS files
A CSS rule consists of a selector and a declaration block. The selector points to the HTML element you want to style. The declaration block contains one or more declarations separated by semicolons. Each declaration includes a CSS property name and a value, separated by a colon. Multiple CSS declarations are separated with semicolons, and declaration blocks are surrounded by curly braces.
Example
In this example all ≺ p ≻ elements will be center-aligned, with a red text color:
color: red;
text-align: center;
}
In the above example
- p is a selector in CSS (it points to the HTML element you want to style: ≺ p ≻).
- color is a property, and red is the property value
- text-align is a property, and center is the property value
Padding is the space between an element's border and the
element's content. That is, the inner space between the content
and the border of your box.
Margin refers to the outer space (or lack of space) surrounding
the box. It is the space around an element's border.
Border is the perimeter of the box. Borders can be
invisible or they could be a thick colored line they come in
different styles