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

CSS Properties and HTML Elements Guide

The document provides a comprehensive list of CSS properties along with example values and common HTML elements associated with each property. Key properties include color, font-size, font-family, and display, among others. This serves as a reference for web developers to understand how to style various HTML elements using CSS.
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)
91 views2 pages

CSS Properties and HTML Elements Guide

The document provides a comprehensive list of CSS properties along with example values and common HTML elements associated with each property. Key properties include color, font-size, font-family, and display, among others. This serves as a reference for web developers to understand how to style various HTML elements using CSS.
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

‭CSS Property‬ ‭Example Values‬ ‭Common HTML Elements‬

color‬
‭ red‬
‭ #000000‬
‭,‬‭ p‭,‬‬‭
‭ h1–h6‬ a‭,‬‬‭
‭,‬‭ span‬ div‬
‭,‬‭

font-size‬
‭ 16px‬
‭ 1em‬
‭,‬‭ 120%‬
‭,‬‭ p‭,‬‬‭
‭ h1–h6‬ a‭,‬‬‭
‭,‬‭ li‬ span‬
‭,‬‭

font-family‬
‭ Arial‬
‭ Georgia‬
‭,‬‭ sans-serif‬
‭,‬‭ body‬
‭ p‬
‭,‬‭ h1–h6‬
‭,‬‭ div‬
‭,‬‭ span‬
‭,‬‭

font-weight‬
‭ bold‬
‭ normal‬
‭,‬‭ 700‬
‭,‬‭ h1–h6‬
‭ p‭,‬‬‭
‭,‬‭ strong‬ span‬
‭,‬‭

text-align‬
‭ left‬
‭ center‬
‭,‬‭ justify‬
‭,‬‭ p‭,‬‬‭
‭ div‬ td‬
‭,‬‭ section‬
‭,‬‭

text-decorati‬ ‭
‭ none‬ underline‬
‭,‬‭ a‭,‬‬‭
‭ span‬ h1–h6‬
‭,‬‭ p‬
‭,‬‭
on‬

line-height‬
‭ 1.5‬
‭ 150%‬
‭,‬‭ p‭,‬‬‭
‭ h1–h6‬ div‬
‭,‬‭ li‬
‭,‬‭

background-co‬ ‭
‭ blue‬ #f0f0f0‬
‭,‬‭ div‬
‭ body‬
‭,‬‭ section‬
‭,‬‭ table‬
‭,‬‭
lor‬

width‬‭/‬‭
‭ height‬ ‭
300px‬ auto‬
‭,‬‭ div‬
‭ img‬
‭,‬‭ table‬
‭,‬‭ section‬
‭,‬‭

margin‬‭/‬
‭ 10px‬
‭ 0 auto‬
‭,‬‭ div‬
‭ p‭,‬‬‭
‭,‬‭ section‬ body‬
‭,‬‭
padding‬

border‬
‭ 1px solid black‬
‭ div‬
‭ table‬
‭,‬‭ img‬
‭,‬‭ input‬
‭,‬‭

border-radius‬ ‭
‭ 5px‬ 50%‬
‭,‬‭ div‬
‭ button‬
‭,‬‭ img‬
‭,‬‭ input‬
‭,‬‭

display‬
‭ block‬
‭ inline‬
‭,‬‭ none‬
‭,‬‭ div‬
‭ span‬
‭,‬‭ li‬
‭,‬‭ nav‬
‭,‬‭ img‬
‭,‬‭

position‬
‭ relative‬
‭ absolute‬
‭,‬‭ fixed‬
‭,‬‭ div‬
‭ img‬
‭,‬‭ nav‬
‭,‬‭ header‬
‭,‬‭

top‬
‭ left‬
‭,‬‭ 10px‬
‭ 50%‬
‭,‬‭ ‭Same as above (when positioned)‬

float‬
‭ left‬
‭ right‬
‭,‬‭ img‬
‭ div‬
‭,‬‭ aside‬
‭,‬‭ nav‬
‭,‬‭

z-index‬
‭ 10‬
‭ 1000‬
‭,‬‭ div‬
‭ modal‬
‭,‬‭ dropdown‬
‭,‬‭

list-style-ty‬ ‭
‭ disc‬ none‬
‭,‬‭ ul‬
‭ ol‬
‭,‬‭ li‬
‭,‬‭
pe‬

text-transfor‬ ‭
‭ uppercase‬ capitalize‬
‭,‬‭ h1–h6‬
‭ p‭,‬‬‭
‭,‬‭ label‬ button‬
‭,‬‭
m‬

cursor‬
‭ pointer‬
‭ move‬
‭,‬‭ a‭,‬‬‭
‭ button‬ input‬
‭,‬‭ div‬
‭,‬‭

opacity‬
‭ 0.5‬
‭ 1‬
‭,‬‭ div‬
‭ img‬
‭,‬‭ modal‬
‭,‬‭ section‬
‭,‬‭

visibility‬
‭ hidden‬
‭ visible‬
‭,‬‭ ‭Any block or inline element‬

overflow‬
‭ hidden‬
‭ scroll‬
‭,‬‭ auto‬
‭,‬‭ div‬
‭ textarea‬
‭,‬‭ section‬
‭,‬‭

background-im‬ ‭
‭ url('[Link]')‬ div‬
‭ body‬
‭,‬‭ section‬
‭,‬‭
age‬

table-layout‬ ‭
‭ auto‬ fixed‬
‭,‬‭ table‬

border-collap‬ ‭
‭ collapse‬ separate‬
‭,‬‭ table‬

se‬

caption-side‬ ‭
‭ top‬ bottom‬
‭,‬‭ table‬‭with‬‭
‭ <caption>‬

You might also like