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

Css Programming Cheatsheet

This document is a CSS programming cheatsheet that outlines various selectors and properties used in CSS. It includes examples of selectors such as universal, element, ID, and class selectors, as well as properties for styling elements like color, background-color, font-size, and more. The cheatsheet serves as a quick reference for common CSS syntax and functionality.

Uploaded by

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

Css Programming Cheatsheet

This document is a CSS programming cheatsheet that outlines various selectors and properties used in CSS. It includes examples of selectors such as universal, element, ID, and class selectors, as well as properties for styling elements like color, background-color, font-size, and more. The cheatsheet serves as a quick reference for common CSS syntax and functionality.

Uploaded by

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

CSS Programming Cheatsheet

Selector

Selects all elements

element

Selects all <element> tags

#id

Selects an element with a specific id

.class

Selects all elements with a specific class

element1, element2

Selects all specified elements

element element

Selects all <element> inside another element

element > element

Selects direct child elements

Property

color

Sets the text color

background-color

Sets the background color

font-size

Sets the size of the font

font-family
Sets the font type

text-align

Aligns the text (left, center, right)

margin

Sets outer space around elements

padding

Sets inner space around content

border

Sets border width, style, and color

width / height

Sets the width/height of an element

display

Sets display type (block, inline, flex, none)

position

Sets position (static, relative, absolute, fixed)

z-index

Sets stack order of elements

overflow

Controls content overflow (visible, hidden, scroll)

float / clear

Floats an element or clears float

You might also like