Learn the fundamentals of CSS, the styling language of the web
Basic CSS syntax
Inline CSS
style
attribute.Internal CSS
<style>
element in the <head>
section of an HTML document.External CSS (Recommended)
<link>
element.!important
override other stylesp
, div
).class
), attribute selectors ([type="text"]
), pseudo-classes (:hover
)#id
)style=""
attribute)px
(pixels)pt
(points)in
(inches)cm
(centimeters)mm
(millimeters)%
(percentage of parent)em
(relative to font-size)rem
(relative to root font-size)vw
(viewport width)vh
(viewport height)rem
, em
, and %
over absolute units like px
.