Thank you for making us NO-1 IT Institute.Learn Beyond your Syllabus

Any Query - Tel: 0674-2547486, 6444690/91

CSS Interview Questions and Answers

Q1:  

Which of the following is the appropriate way to hide an element ?

  1. Visibility : hidden
  2. Display : none
  3. Enable : false
  4. None of the above


Answer :

(1) Visibility:hidden  



Q2:  

Which of the following properties are used to make an image transparent?

  1. Transparency
  2. Liquidity
  3. Opacity
  4. Both b and c


Answer :

(3) Opacity



Q3:  

Max-height is a property of all types of CSS dimension.

  1. True
  2. False


Answer :

(2) False



Q4:  

Which is not the correct way of using CSS ?

  1. <head> <link rel=”stylesheet” type=”text/css” href=”mystyle.css”> </head> mystyle hr {color:sienna;} p {margin-left:20px}body {background-image:url(“image/background.gif”);}
  2. <head> <style> hr {color:sienna;} p {margin-left:20px;} body {background-image:url(“image/background.gif”);} </style> </head>
  3. <p style=”color:sienna;margin-left:20px;”> This is a paragraph.</p>
  4. <head> <script> hr {color:sienna;} p {margin-left:20px;} body {background-image:url(“image/background.gif’);}</script> </head>


Answer :

(4) <head> <script> hr {color:sienna;} p {margin-left:20px;} body {background-image:url(“image/background.gif’);}</script> </head>



Q5:  

What does “a:hover” means in CSS ?

 a) a link that user has already visited

 b) a link the moment it is clicked

 c) a link when the user mouse moves over it

 d) a link that is never visited


Answer :

(c) a link when the user mouse moves over it



Q6:  

Which of the following is the correct syntax for creating an ID selector called header having height of 50px and width of 750px along width the text color black?

 a) #header {height: 50px; width: 750px; color: black; }

 b) .header {height: 50px; width: 750; color: black; }

 c) #header {height: 50px; width: 750px; text: black; }

 d) .header {height: 50px; width: 750px; color: black; }


Answer :

(d) .header {height: 50px; width: 750px; color: black; }



Q7:  

Which are the two main parts of a style declaration ?

    a) Property and value

    b) Attributes and methods

    c) Class and ID

    d) None of the above


Answer :

(a) Property and value



Q8:  

The child selector all elements that are the immediate children of a specified element.

     a) True

     b) False


Answer :

(a) True



Q9:  

Name the type of CSS is used when a unique style is to a single occurrence of an element.

  1. Inland style
  2. Internal style sheet
  3. External style sheet
  4. Inline style

 


Answer :

(4) Inline style



Q10:  

Which is the property used to specify table boundaries in CSS ?        

  1. Border
  2. Boundary
  3. Edge
  4. Perimeter


Answer :

(1) Border



Q11:  

The @ import rule can be used to import an external CSS ?

  1. True
  2. False


Answer :

(1) True



Q12:  

Which of the following is the correct attribute for changing the font name in CSS ?

  1. Font-name
  2. Font
  3. Font-family:
  4. Fontname


Answer :

(3) Font-family



Q13:  

Which are the two parts an external CSS is made of ?

    a) Class and ID

    b) Select and Body

   c) Class and Declaration

   d) Select and Declaration


Answer :

d) Select and Declaration



Q14:  

Which of the following has higher priority ?

  1. Cell setting
  2. Table setting
  3. Both have equal priority


Answer :

1) Cell Setting



Q15:  

In how many ways can a CSS be added to a HTML file ?

  1. 1
  2. 2
  3. 3
  4. 4


Answer :

3) 3



Q16:  

Which of the following is the correct syntax for making all elements bold?

  1. span {text- size: bold}
  2. <span style=”font- size: bold”>
  3. <span style=”text-size: bold”>
  4. Span {font-weight: bold}


Answer :

4) Span {font-weight: bold}



Q17:  

Which tag defines the relationship between a document and an external resource ?

  1. <style>
  2. <href>
  3. <link>
  4. <relate>


Answer :

3) link



© 2011 LITSOLUTION . All Rights Reserved

Site designed and developed by LITSOLUTION