CSS Interview Questions -2

Post your answers to the questions let’s see who will give all answers correct.

  1. what is pre-formateed tag?
  2. What are the different types of css units?
  3. Name self closing tags ?
1 Like
  1. Pre tags gives the output same as we write in compiler

1 its show the content as how it was written

pre tag displays the content written in it exactly like it on the page
px, em, %
tags that dont need closing tag like img, br etc

  1. Px, rem, percentage, degree

the

 tad in html usedd to define thr block of preformatted text which preserves the text spaces, line breaks, tabs, and other formatting characters which are ignored by web browsers.

  1. Input, hr, br and img

Px ℅ rem em vh and some units

  1. what is pre-formatted tag?

Text in a < pre > element is displayed in a fixed-width font, and the text preserves both spaces and line breaks. The text will be displayed exactly as written in the HTML source code.

2.What are the different types of css units?

Unit Description
cm centimeters
mm millimeters
in inches (1in = 96px = 2.54cm)
px * pixels (1px = 1/96th of 1in)
pt points (1pt = 1/72 of 1in)
pc picas (1pc = 12 pt)

3.Name self closing tags ?
self-closing tags are < input/ >, < hr/ >, < br/ >, < img/ >, < link >, < meta >,etc.