0% found this document useful (0 votes)
47 views2 pages

CSS Properties Reference

This document outlines key CSS properties along with their meanings and example usage. It includes properties for text color, background color, font size, alignment, spacing, borders, and layout behaviors. The table serves as a quick reference for developers to understand and implement various CSS styles.

Uploaded by

Ehtasham Umar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views2 pages

CSS Properties Reference

This document outlines key CSS properties along with their meanings and example usage. It includes properties for text color, background color, font size, alignment, spacing, borders, and layout behaviors. The table serves as a quick reference for developers to understand and implement various CSS styles.

Uploaded by

Ehtasham Umar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

CSS Properties and Their Meanings

This document provides a table of the most important CSS properties, their meanings, and
example usage.

Property Purpose Example Code


color Sets the text color color: red;
background-color Sets the background color background-color: yellow;
font-size Sets the size of the font font-size: 16px;
font-family Sets the font type font-family: Arial, sans-
serif;
text-align Aligns the text text-align: center;
margin Sets the outer space around margin: 20px;
elements
padding Sets the inner space inside padding: 10px;
the border
border Sets border around an border: 1px solid black;
element
width Sets the width of an element width: 100px;
height Sets the height of an height: 200px;
element
display Defines the display display: block;
behavior
position Defines element positioning position: absolute;
top / left / right / bottom Offsets for positioned top: 10px;
elements
z-index Sets stack order of elements z-index: 1;
overflow Handles overflowed content overflow: auto;
float Floats an element left or float: left;
right
clear Stops floating clear: both;
visibility Shows or hides an element visibility: hidden;
opacity Sets the transparency level opacity: 0.5;
box-shadow Adds shadow to boxes box-shadow: 2px 2px 5px
gray;
text-shadow Adds shadow to text text-shadow: 1px 1px 2px
black;
cursor Changes the mouse cursor cursor: pointer;
transition Smoothly animates transition: all 0.3s ease;
property changes
transform Transforms elements (scale, transform: rotate(45deg);
rotate)
flex Applies flexbox to layout display: flex;
justify-content Aligns items on main axis justify-content: center;
align-items Aligns items on cross axis align-items: center;
grid Applies grid layout display: grid;
gap Sets gap between grid/flex gap: 10px;
items
animation Defines animation behavior animation: fadeIn 2s ease-
in;

You might also like