CSS Tutorial in Hindi [Part 16] - CSS Units (CSS Px vs Em vs Rem: what is the difference?)

Tech Gun
Youtube
Related Topic
:- CSS Web Development

In this video i will talk about Units in CSS and what is the difference between Px, Em and Rem. There are two types of units in CSS 1. Absolute 2. Relative 1. Absolute a) cm b) mm c) in d) px (1 inch = 96px) e) pt (1 inch = 72pt) f) pc (1 pc = 12pt) 2. Relative a) em - relative to parent element b) rem - relative to root (HTML) element c) vh - 1% of viewport height d) vw - 1% of viewport width e) % - percentage of parent element

Comments