Skip to Content, PHP, MySQL, Javascript, Ajax, Htacces

CSS Interview Questions and Answers Part-3

Be First!

css21.What is the purpose of in measurement unit?
in − Defines a measurement in inches.

p {word-spacing: .15in;}

22.What is the purpose of mm measurement unit?
mm − Defines a measurement in millimeters.

p {word-spacing: 15mm;}

23.What is the purpose of pc measurement unit?
pc − Defines a measurement in picas. A pica is equivalent to 12 points; thus, there are 6 picas per inch.

p {font-size: 20pc;}

24.What is the purpose of pt measurement unit?
pt − Defines a measurement in points. A point is defined as 1/72nd of an inch.

body {font-size: 18pt;}

25.What is the purpose of px measurement unit?
px − Defines a measurement in screen pixels.

p {padding: 25px;}

26.What is the purpose of vh measurement unit?
vh − 1% of viewport height.

h2 { font-size: 3.0vh; }

27.What is the purpose of vw measurement unit?
vw − 1% of viewport width.

h1 { font-size: 5.9vw; }

28.What is the purpose of vmin measurement unit?
vmin 1vw or 1vh, whichever is smaller.

p { font-size: 2vmin;}

29.What are browser safe colors?
There is the list of 216 colors which are supposed to be most safe and computer independent colors. These colors vary from hexa code 000000 to FFFFFF. These colors are safe to use because they ensure that all computers would display the colors correctly when running a 256 color palette.

30.Which property is used to set the background color of an element?
The background-color property is used to set the background color of an element.




Leave a Reply