Units in CSS

Units in CSS is the measurment of length which specifies the size of the elements on the website there are two types of units in CSS one is absolute unit and the other one is relative as the name suggest absolute units are fixed and don't change according to device's width while relative may change examples of units measurment are as em it depends on size of element specified on the parent and it changes correspondence to it's parent value given to the element.rem unit as it depends on it's root unit as size of the element changes according to it's root.px unit is fixed it doesn't depend on screen width of the device .percentage depends on the whole size of the screen while vh and vw it also depends on size of the screen and hence these units are used to measure size of the element.