What is REM and EM in CSS?
Channel:
Subscribers:
17,600
Published on ● Video Link: https://www.youtube.com/watch?v=4V91kDdh2iw
You'll learn how to use em and rem in CSS in this video. EM is used to change the font size of an HTML element multiplied by its parent's font size. For example, place a paragraph, and inside that paragraph, place a span element. Now, if you say, span { font-size:2em}, it will multiply the font size of the span by how many times you want. 2em means multiply by two. 1em means, do not multiply. As for rem, rem is a little bit different because it multiplies the font size of the root element of an HTML document. For example, the default size of the HTML document is 16 pixels. If you say, font-size: 2rem. It means two times 16 which is 32 pixels. I hope that I have given you a basic idea about both CSS measurements.
#css #tutorial #trending
Other Videos By The Wheelchair Guy
Tags:
how
to
use
rem
em
css
font
size
font-size
cascading style
tutorial
for
beginners
coding for beginners
element
html
html 5
five
coding
htm
new
video
2022
2023
halloween
the
wheelchair
guy