0% found this document useful (0 votes)
3 views

Css Cheat Sheet

The document provides a comprehensive overview of various CSS properties and selectors used for styling HTML elements. It categorizes properties into sections such as Selectors, Text, Background, Border, Font, Table, and Hyperlink, detailing their usage and effects. Each category includes specific properties along with their functionalities, such as text alignment, background settings, and link states.

Uploaded by

t24026463
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Css Cheat Sheet

The document provides a comprehensive overview of various CSS properties and selectors used for styling HTML elements. It categorizes properties into sections such as Selectors, Text, Background, Border, Font, Table, and Hyperlink, detailing their usage and effects. Each category includes specific properties along with their functionalities, such as text alignment, background settings, and link states.

Uploaded by

t24026463
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Category

Property/Selector
Usage
Selectors * Selects all elements
Selectors .classnameSelects elements with that class
Selectors #idname Selects element with that ID
Selectors element Selects all such HTML elements (e.g., p, div)
Selectors element1, Selects multiple elements
Selectors parent > chSelects direct child only
Selectors element + sSelects the next sibling
Text color Text color
Text text-align Aligns text (left, center, right)
Text text-decor Underline, overline, none, etc.
Text text-trans Uppercase, lowercase, capitalize
Text line-heightSpace between lines
Text letter-spacSpace between letters
BackgrounbackgroundSets background color
BackgrounbackgrounSets a background image
BackgrounbackgroundControls image repeating (repeat, no-repeat)
BackgrounbackgroundPositioning of background image
BackgrounbackgroundResize background image (cover, contain)
Border border Shorthand for width, style, and color
Border border-widSets border thickness
Border border-stylSolid, dashed, dotted, etc.
Border border-col Sets color of border
Border border-radRounds the corners
Font font-familyFont type (e.g., Arial, sans-serif)
Font font-size Size of the font
Font font-weighBoldness (normal, bold, lighter, 100-900)
Font font-style Normal or italic
Font font-varianSmall-caps transformation
Font line-heightLine spacing
Table border-col Collapses border spacing (collapse, separate)
Table table-layouFixed or automatic layout
Table caption-sidPosition of caption (top, bottom)
Table empty-cellShow or hide borders on empty cells
Table border-spaSets space between cells (used when separate)
Hyperlink a:link Unvisited link
Hyperlink a:visited Visited link
Hyperlink a:hover Link on hover
Hyperlink a:active Link when clicked
Hyperlink text-decor Underline or remove underline from link
Hyperlink color Sets link color

You might also like