1. Consider the following code snippet:

<div id=”sectors”>
<div id=”A” class=”A”></div>
<div id=”B” class=”B”></div>
<div id=”C” class=”C”></div>
<div id=”D” class=”D”></div>
<div id=”E” class=”E”></div>
</div>
With these style rules:
<style>
#sectors > div {
float: left;
position: relative;
width: 80px;
height: 80px;
margin: 16px;
background-color:red; color: white;
text-align: center;
}
#sectors > div::after {
content: attr(id) ‘-Block’;
}
#sectors > div.changecolor {
background-color: blue;
}
</style>

Which of the following code snippets when inserted into CSS will change the A and B div’s color from red to blue?

Answers:

  1. In style rule add this code “#sectors > div:not(.C):not(.D):not(.E) {background-color: blue;}”
  2. In style rule add this code “#sectors > div:not(.C, .D, .E) {background-color: blue;}”
  3. Both A and B
  4. None of the above

2. Which of the following will create a triangle effect using pure CSS3 on a white background, without making use of background images?

Answers:

  1. It is not possible to do so.
  2. border-color: #a0c7ff #ffffff #ffffff #ffffff; border-style: solid; border-width: 20px; width: 0px; height: 0px;
  3. background-color: #a0c7ff #ffffff #ffffff #ffffff; border-style: solid; border-width: 20px; width: 0px; height: 0px;
  4. background-color: #a0c7ff #ffffff #ffffff #ffffff; border-style: solid; border-width: 1px; width: 10px; height: 10px;

3. Can a percentage value be given in a ruby-align property?

Answers:

  1. Yes
  2. No

4. Consider the following font definition:

font-weight:normal

What is the other way of getting the same result?

Answers:

  1. font-weight:100
  2. font-weight:900
  3. font-weight:400
  4. font-weight:700

5. Consider the following code:

div[class^=”stronger”] { }
{em

}

Which of the following statements is true?

Answers:

  1. It applies the rule only on divs who belong to a class that begins with “stronger”.
  2. It applies the rule only on divs of class “stronger”.
  3. It applies the rule only on divs who belong to a class which end with “stronger”.
  4. It applies the rule only on divs who belong to a class which does not contain “stronger” in its name.



6. For the clear property, which of the following values is not valid?

Answers:

  1. none
  2. left
  3. right
  4. top

7. What will be the output of the following code?
<style>
.foo {
width:100px;
height:50px;
border-width:3px;
-webkit-border-image:
-webkit-gradient(linear, 0 0, 0 100%, from(black), to(red)) 1 100%;
-webkit-border-image:
-webkit-linear-gradient(black, red) 1 100%;
-o-border-image:
-o-linear-gradient(black, red)) 1 100%;
-moz-border-image:
-moz-linear-gradient(black, red) 1 100%;

}
</style>

<div class=”foo”>Lorem</div>

Answers:

  1. The text “Lorem” will be colored black-red.
  2. The div element will be colored black-red.
  3. The border of div element will be colored black-red.
  4. None of these.

8. Which of the following is not a valid value for the font-smooth property?

Answers:

  1. auto
  2. never
  3. always
  4. normal
  5. length

9. Which of the following option does not exist in media groups available in CSS3?

Answers:

  1. continuous or paged
  2. visual or tactile
  3. grid or bitmap
  4. braille or screen

10. Which of the following is not a valid page break?

Answers:

  1. page-break-inside
  2. page-break-outside
  3. page-break-before
  4. page-break-after
  5. None of these

11. Which statement is correct given the following?
box-shadow:30px 20px 10px 5px black;

Answers:

  1. The shadow will be spread out to 30px top, 20px right, 10px bottom, 5px left.
  2. The position of the horizontal black shadow is 30px and the position of the vertical black shadow is 20px and blur distance is 10px and size of shadow is 5px.
  3. The position of the vertical black shadow is 30px and the position of the horizontal black shadow is 20px and size of shadow is 10px and blur distance is 5px.
  4. The shadow will be spread out to 30px top and bottom, 20px left and right with 10px blur distance, 5px shadow size.

12. The min-width property cannot be applied to the following element:

Answers:

  1. button
  2. span
  3. table row

13. Given the following problem:

A drop shadow needs to appear only at the bottom, and no images should be used.
Consider the following code:

-moz-box-shadow: 0px 4px 4px #000;
-webkit-box-shadow: 0px 4px 4px #000;
box-shadow-bottom: 5px #000;

However, this produces shadows on the rest of the element.

Which of the following code snippets will correct the issue?

Answers:

  1. border-bottom:5px solid #ffffff; -webkit-box-shadow: 0px 5px #000000; -moz-box-shadow: 0px 5px #000000; box-shadow: 0px 5px #000000;
  2. -webkit-box-shadow: 0 4px 4px -2px #000000; -moz-box-shadow: 0 4px 4px -2px #000000; box-shadow: 0 4px 4px -2px #000000;
  3. -webkit-box-shadow: 0 4px 4px -2px inside #000000; -moz-box-shadow: 0 4px 4px -2px inside #000000; box-shadow: 0 4px 4px -2px inside #000000;
  4. None of these.

14. Consider the following code:

body { text-replace: “a” “b” “b” “c” }

What will be the output of the following string if the text-replace style is implemented?

andy lives behind cafe

Answers:

  1. ndy lives behind cbfe
  2. cndy lives cehind ccfe
  3. andy lives behind cafe
  4. andy lives cehind bafe

15. What is the default value of the transform-style property?

Answers:

  1. preserve-3d
  2. flat
  3. none
  4. preserve

16. What will be the output of the following code?…
<style>
.foo {
width:100px;
height:50px;
border-width:3px;
-webkit-border-image:
-webkit-gradient(linear, 0 0, 0 100%, from(black), to(red)) 1 100%;
-webkit-border-image:
-webkit-linear-gradient(black, red) 1 100%;
-o-border-image:
-o-linear-gradient(black, red)) 1 100%;
-moz-border-image:
-moz-linear-gradient(black, red) 1 100%;

}
</style>

<div class=”foo”>Lorem</div>

Answers:

  1. The text “Lorem” will be colored black-red.
  2. The div element will be colored black-red.
  3. The border of div element will be colored black-red.
  4. None of these.

17. Which of the following styles is not valid for an image?

Answers:

  1. img { float= left }
  2. img { float: left here }
  3. img { background: “black” }
  4. img { border-width: 10 }
  5. All of the above

18. Suppose that a <tr> tag has 10 <td> tags. In this case which statement is correct given the following?
td:nth-child(3n+0){
background-color: orange;
}

Answers:

  1. It returns a syntax error.
  2. The background color of the fourth td will be orange.
  3. The background color of the third td will be orange.
  4. The background color of every third td will be orange.

19. What is the best method to select all elements except for the last one in an unordered list?

Answers:

  1. Adding a class to each <li> element but last
  2. Using li:not(:last-child) css selector
  3. Using li:last-child selector
  4. None of the above

20. Which of the following will apply a black inner glow with 25% opacity to a page element?

Answers:

  1. box-shadow: 0 0 8px rgba(255,255,255, 0.25);
  2. box-shadow: inset 0 0 8px rgba(0,0,0, 0.25);
  3. box-shadow: 0 0 8px rgba(255,255,255, 25%);
  4. box-shadow: inset 0 0 8px rgba(0,0,0, 25%);

21. Which of the following is the initial value for the column-fill property?

Answers:

  1. auto
  2. balance
  3. none

22. Which of the following can be used to add a shadow around the div element below?
<div>Lorem ipsum</div>

Answers:

  1. box-shadow: 0 0 8px 2px #888;
  2. border-shadow: 0 0 8px 2px #888;
  3. div-shadow: 8px 2px 0 0 #888;
  4. None of these

23. Which of the following will decrease 50px from a DIV element whose width is 100%?

Answers:

  1. width: calc(100% – 50px);
  2. width: reduce(100% – 50px);
  3. width: decrease(100% – 50px);
  4. width: 100% – 50px;

24. Which of the following properties specifies the minimum number of lines of a paragraph that must be left at the bottom of a page?

Answers:

  1. orphans
  2. widows
  3. bottom
  4. overflow
  5. None of these

25. What is the maximum value that can be given to the voice-volume property?

Answers:

  1. 10
  2. 100
  3. 500
  4. None of the above

26. What is the initial value of the font-size property?

Answers:

  1. small
  2. medium
  3. large
  4. default

27. Is there a way to create a pure CSS3 text color gradient?

Answers:

  1. Yes, using the text-gradient property.
  2. Yes, but only for headings.
  3. There is no way to do a text color gradient with CSS3.
  4. None of the above.

28. Consider the following code:

border-opacity:0.7;

Given a div element that needs to have a transparent red border, which of the following code samples will work in conjunction with the code above to accomplish the requirement?

Answers:

  1. border: 1px solid rgba(255, 0, 0, 0.7);
  2. border: 1px solid rgb(255, 0, 0, 0.7);
  3. border: 1px solid rgba(255, 255, 0, 0.7);
  4. border: 1px solid red; opacity: 0.7;

29. What is the initial value of the animation-iteration-count property?

Answers:

  1. 1
  2. 5
  3. None

30. What is the default value of the animation-direction property?

Answers:

  1. none
  2. normal
  3. alternate
  4. inherited

31. Is it possible to combine a background image and CSS3 gradients?

Answers:

  1. It is possible only when two separate styles are used, “background-image” and “gradient”, on an HTML tag.
  2. It is possible only when “background-image” is used.
  3. It is possible only when layered HTML tags are used, “background-image” and “gradient”.
  4. It is not possible to combine a background image and CSS3 gradients.

32. What will happen if the cursor property value is set to none?
Answers:

  1. The default cursor will be displayed.
  2. No cursor will be displayed.
  3. A pointer cursor will be displayed.
  4. A text cursor will be displayed.

33. What will be the outcome of given code?
div[class^=”stronger”] { }
{

}
Answers:

  1. It applies the rule only on divs who belong to a class that begins with “stronger”.
  2. It applies the rule only on divs of class “stronger”.
  3. It applies the rule only on divs who belong to a class which end with “stronger”.
  4. It applies the rule only on divs who belong to a class which does not contain “stronger” in its name.

34. To apply style on every input element except text, which of the following selectors should be used?

Answers:

  1. input:([!type=’text’])
  2. input:not([type=”text”])
  3. input:not([type!=”text”])
  4. input:([type!=’text’])

35. For the clear property, which of the following value is not valid?

Answers:

  1. none
  2. left
  3. right
  4. top

36. Read the following:

@page rotated {size: landscape}
TABLE {page: rotated; page-break-before: right}

What will this code do?

Answers:

  1. It will put all tables on a right-hand side landscape page.
  2. It will rotate the page if the table is positioned at the right side.
  3. It will keep the table in the landscape position and rotate the page.
  4. None of the above

37. What is the initial value of the opacity property?

Answers:

  1. 1
  2. normal
  3. none

38. State whether the following statement is true or false.

If a parent element display property is set to none, its children too will not be rendered.

Answers:

  1. True
  2. False

39. Which of the following filters does SVG support?

Answers:

  1. SVG supports only CSS filters.
  2. SVG supports CSS filters as well as ‘filter’ property of SVG
  3. SVG supports only ‘filter’ property of SVG
  4. SVG does not supports any filters

40. What will happen if the pause property is used as follows?

h2 { pause: 40s 60s }

Answers:

  1. pause-before will be set to 40 seconds and pause-after will be set to 60 seconds.
  2. pause-after will be set to 40 seconds and pause-before will be set to 60 seconds.
  3. pause-after and pause-before will be set to 40 seconds.
  4. pause-after and pause-before will be set to 60 seconds.

41. Which of the following properties allow percentages in their value fields?

Answers:

  1. font-size
  2. font-variant
  3. font-weight
  4. line-height

42. Which of the following is not a valid value for the font-stretch property?

Answers:

  1. condense
  2. normal
  3. semi-narrower
  4. expanded
  5. semi-expanded

43. Which of the following styles is valid?

Answers:

  1. order: “none”;
  2. order= “none”;
  3. order: none;
  4. order= none;
  5. None of these.

44. Which one of the following is appropriate to mirror/flip text by using CSS3?

Answers:

  1. .mirror_text{ -moz-transform: scaleX(-1); -o-transform: scaleX(-1); -webkit-transform: scaleX(-1); transform: scaleX(-1); filter: FlipH; -ms-filter: “FlipH”; }
  2. .mirror_text{ Box-reflect; 20px right; }
  3. .mirror_text{ Box-reflect; 20px left; }
  4. .mirror_text{ -moz-transform: rotate(-180deg); -webkit-transform: rotate(-180deg); transform: rotate(-180deg); }

45. What is the initial value of the marquee-speed property?

Answers:

  1. slow
  2. normal
  3. fast
  4. none

46. Which of the following will apply a gradient transition to #DemoGradient using CSS3?

Answers:

  1. @-webkit-keyframes pulse #DemoGradient { 0% { background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgb(196,222,242)), color-stop(0.5, rgb(242,242,242)), color-stop(1, rgb(240,240,240))); } 50% { background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgb(222,252,255)), color-stop(0.5, rgb(242,242,242)), color-stop(1, rgb(240,240,240))); } 100% { background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgb(196,222,242)), color-stop(0.5, rgb(242,242,242)), color-stop(1, rgb(240,240,240))); } }
  2. #DemoGradient{ background: -webkit-linear-gradient(#C7D3DC,#5B798E); background: -moz-linear-gradient(#C7D3DC,#5B798E); background: -o-linear-gradient(#C7D3DC,#5B798E); background: linear-gradient(#C7D3DC,#5B798E); -webkit-transition: background 1s ease-out; -moz-transition: background 1s ease-out; -o-transition: background 1s ease-out; transition: background 1s ease-out; background-size:1px 200px; border-radius: 10px; border: 1px solid #839DB0; cursor:pointer; width: 150px; height: 100px; } #DemoGradient:Hover{ background-position:100px; }
  3. It is not possible to apply a gradient transition using only CSS3.

47. Using height on transitions is not possible with:

Answers:

  1. height:auto
  2. height:100%
  3. height:0
  4. max-height:100%

48. Consider the following problem:
When trying to apply a CSS3 style to a label of a checked radio button like this:
….
<style>
label:checked { font-weight: bold; }
</style>
….
<input type=”radio” id=”rad” name=”radio”/>
<label for=”rad”>A Label</label>

This does not produce the desired effect.
Which of the following snippets will correct issue?

Answers:

  1. It is not possible to style.
  2. <input id=”rad” type=”radio” name=”rad”><label “rad”>A Label</label>
  3. input[type=”radio”]:checked+label{ font-weight: bold; }
  4. input[type=”radio”]:checked@label{ font-weight: bold; }

49. There are various types of input fields in a HTML page. Choose the appropriate CSS3 code which will have an effect on all inputs, except checkbox and radio.

Answers:

  1. form input:not([type=”radio”], [type=”checkbox”]) { }
  2. input:not([type=”radio”]):not([type=”checkbox”]) { }
  3. input:not([type=”radio & checkbox”]) { }
  4. input:!([type=”radio”]) , input:!([type=”checkbox”]) { }

50. Is it possible to use transition animations with a gradient background?

Answers:

  1. Yes
  2. No

51. What is the difference between float:left; vs display:inline-block; ?

Answers:

  1. There is no difference, both of them have the same results.
  2. display:inline-block; adds whitespace between the elements.
  3. float:left; collapses the parent element on itself.
  4. None of these.

52. What is the range of values (in decimal notation) that can be specified in the RGB color model?

Answers:

  1. 0 to 256
  2. 0 to 255
  3. -250 to 250
  4. -255 to 255

53. Which of the following are not valid values for the target-new property?

Answers:

  1. window
  2. tab
  3. none
  4. parent
  5. current

54. What will be the output of the following rule?

em { color: rgba(0,0,255,1) }

Answers:

  1. Opacity 1 with solid red color
  2. Opacity 0 with solid blue color
  3. Opacity 0 with solid red color
  4. Opacity 1 with solid blue color
  5. None of these

55. While rendering the following code, what is the role of “src” propery?

@font-face {
font-family: “calibriforh1”;
src: local(“calibri”), url(calibri.woff);
}
h1 { font-family: “calibriforh1”, arial, sans-serif; }

Answers:

  1. It’s for searching the user’s system for a “calibri” font, and if it does not exist, it will load the font from the server instead.
  2. It’s for searching the user’s system for a “calibri” font, and if it does not exist, it will load user’s system’s default font instead.
  3. It’s for loading the user’s system’s default font.
  4. None of these.

56. Which of the following statements is true with regard to CSS3 transitions?

Answers:

  1. Using CSS transitions will slow down page upload and produce lag.
  2. The completion of a CSS transition generates a corresponding DOM event. An event is fired for each property that
  3. undergoes a transition. This allows a content developer to perform actions that synchronize with the completion of a transition.
  4. CSS transitions allow DOM events in CSS values to occur smoothly over a specified duration.
  5. None of these.

57. Given that one div element needs to be hidden and on active state needs to be displayed, what will be the output of the following code?

div {
display: none;
-webkit-transition: opacity 1s ease-out;
opacity: 0;
}

div.active {
opacity: 1;
display: block;
}

Answers:

  1. On active state the element is displayed.
  2. On active state the element’s opacity is changed to 1.
  3. On active state the element’s opacity is changed to 0.
  4. Nothing will be shown.

58. Which of the given options is/are equivalent to the following rule?

DIV { line-height: 1.2; font-size: 10pt }

Answers:

  1. DIV { line-height: 1.2em; font-size: 10pt }
  2. DIV { line-height: 12em; font-size: 10pt }
  3. DIV { line-height: 120%; font-size: 10pt }
  4. DIV { line-height: 20%; font-size: 10pt }
  5. DIV { line-height: 80%; font-size: 10pt }

59. What will happen if the following style declaration is applied to an element?

p { margin: 3em 2em }

Answers:

  1. The top and the bottom margins will be 3em and the left and the right margins will be 2em.
  2. The top and the bottom margins will be 2em and the left and the right margins will be 3em.
  3. The top and the left margins will be 3em and the bottom and the right margins will be 2em.
  4. The top and the right margins will be 2em and the bottom and the left margins will be 3em.

60.Problem to solve:
Need to use attribute selector in css to change link on different color and image.
The following code is not working correctly:

<style>
a {
display: block;
height: 25px;
padding-left: 25px;
color:#333;
font: bold 15px Tahoma;
text-decoration: none;
}
a[href=’.pdf’] { background: red; }
</style>
…..
<a href=»/manual.pdf»>A PDF File</a>
Which of the following code snippets will correct issue?

Answers:

  1. a[href$=’.pdf’] { /*css*/ }
  2. a[href#=’.pdf’] { /*css*/ }
  3. a[href@=’.pdf’] { /*css*/ }
  4. a{href$=’.pdf’} [/*css*/ ]

61.Suppose there are 16 elements and a style needs to applied only on every 4th element. Which of the following is correct?

Answers:

  1. div:nth-child(4), div:nth-child(8), div:nth-child(12), div:nth-child(16) { }
  2. div:nth-child(4n) { }
  3. div:nth-child(4n+4) { }
  4. div:nth-child(3n+4)

62.To make childdiv vertically center of given code, what should the “display” property of parentdiv and childdiv be?
#parentdiv
{
width: 200px;
height: 400px;
vertical-align: middle;
}

#childdiv
{
width: 100px;
height: 50px;
}

Vertical Center

Answers:

  1. display:table-cell; for parentdiv and display:inline-block; for childdiv
  2. display:block; for parentdiv and display:inline-block; for childdiv
  3. display:inline-block; for parentdiv and display:table-cell; for childdiv
  4. display:inline-block; for parentdiv and display:inline-block; for childdiv

63.Which of the following can be used to add a shadow around the div element below?

Lorem ipsum

Answers:

  1. . box-shadow: 0 0 8px 2px #888;
  2. border-shadow: 0 0 8px 2px #888;
  3. div-shadow: 8px 2px 0 0 #888;
  4. None of these

64.Is it possible to format numbers with CSS?

Answers:

  1. .No, CSS cannot be used for that purpose.
  2. Yes, it can be done using the number-format property.
  3. Yes, it can be done using the decimal property.
  4. None of these

65.What is true about the background-clip property?
<style>
.foo {
width:100px;
height:50px;
border-width:3px;
-webkit-border-image:
-webkit-gradient(linear, 0 0, 0 100%, from(black), to(red)) 1 100%;
-webkit-border-image:
-webkit-linear-gradient(black, red) 1 100%;
-o-border-image:
-o-linear-gradient(black, red)) 1 100%;
-moz-border-image:
-moz-linear-gradient(black, red) 1 100%;
}
</style>
<div class=»foo»>Lorem</div>
Answers:

  1. The text «Lorem» will be colored black-red.
  2. The div element will be colored black-red.
  3. The border of div element will be colored black-red.
  4. None of these

66.What is true about the background-clip property?

Answers:

  1. The background-clip property specifies the painting area of the background.
  2. The background-clip property is not supported in Internet Explorer 8 and earlier versions.
  3. The background-clip property is supported in Internet Explorer 9+, Firefox, Opera, Chrome, and Safari.
  4. All are correct.

67. What will be the output of the following rule?

@font-face {
font-family: «calibriforh1»;
src: local(«calibri»), url(calibri.woff);
}
h1 { font-family: «calibriforh1», arial, sans-serif; }

Answers:

  1. It’s for searching the user’s system for a «calibri» font, and if it does not exist, it will load the font from the server instead.
  2. It’s for searching the user’s system for a «calibri» font, and if it does not exist, it will load user’s system’s default font instead.
  3. It’s for loading the user’s system’s default font.
  4. None of these.

68.Suppose there are 16 <div> elements and a style needs to applied only on every 4th element. Which of the following is correct?

Answers:

  1. div:nth-child(4), div:nth-child(8), div:nth-child(12), div:nth-child(16) { }
  2. div:nth-child(4n) { }
  3. div:nth-child(4n+4) { }
  4. div:nth-child(3n+4)

69. To make childdiv vertically center of given code, what should the «display» property of parentdiv and childdiv be?
#parentdiv
{
width: 200px;
height: 400px;
vertical-align: middle;
}

#childdiv
{
width: 100px;
height: 50px;
<div id=»parentdiv»>
<div id=»childdiv»>Vertical Center</div>
</div>
Answers:

  1. display:table-cell; for parentdiv and display:inline-block; for childdiv
  2. display:block; for parentdiv and display:inline-block; for childdiv
  3. display:inline-block; for parentdiv and display:inline-block; for childdiv
  4. display:inline-block; for parentdiv and display:inline-block; for childdiv

70.The sans-serif generic font-family is characterized by:

Answers:

  1. .Finish strokes, flared or tapering ends, or actual serifed endings.
  2. Stroke endings that are plain without any flaring, cross stroke, or other ornamentation.
  3. Either join strokes or other cursive characteristics beyond those of italic typefaces.
  4. Primarily decorate the characters while still containing their representations.

71.Which of the following is the best implementation of a continuously rotating animated image in CSS3?

Answers:

  1. div{
    box-sizing:border-box;
    -moz-box-sizing:border-box;
    -webkit-box-sizing:border-box;
    width:100px;
    height:100px;
    border:20px solid red;
    background:green;
    margin:10px;
    }
    div + div{
    border:10px solid red;
    }
  2. @-webkit-keyframes rotate {
    from {
    -webkit-transform: rotate(0deg);
    }
    to {
    -webkit-transform: rotate(360deg);
    }
    }
    #rotating img
    {
    -webkit-animation-name: rotate;
    -webkit-animation-duration: 0.5s;
    -webkit-animation-iteration-count: infinite;
    animation-timing-function: linear;
    -webkit-animation-timing-function: linear;
    -moz-animation-timing-function: linear;
    }
  3. @-webkit-keyframes rotate {
    from {
    -webkit-transform: rotate(0deg);
    }
    to {
    -webkit-transform: rotate(360deg);
    }
    }
    #rotating img
    {
    transition-timing-function: linear;
    -webkit-transition-timing-function: linear;
    -moz-transition-timing-function: linear;
    }

72.Which of the following is the best way to center a div element?

Answers:

  1. Apply ‘float:none’ to the element you want to center.
  2. Apply ‘margin:0 auto’ to the element you want to center.
  3. Apply ‘text-align:center’ to the element you want to center.
  4. None of these.

73.Which of the following statements is true about z-index in CSS3?

Answers:

  1. Z-index only affects text elements.
  2. Z-index only used for pseudo-class elements.
  3. Z-index only affects positioned elements.
  4. Z-index only affects absolute positioned elements.

74.Which of the following statements is true about z-index in CSS3?
@font-face {
font-family: «DejaVu Sans»;
src: url(«fonts/DejaVuSans.ttf»);
}
@font-face {
font-family: «DejaVu Sans»;
src: url(«fonts/DejaVuSans-Bold.ttf»);
font-weight: bold;
}
@font-face {
font-family: «DejaVu Sans»;
src: url(«fonts/DejaVuSans-Oblique.ttf»);
font-style: italic, oblique;
}
@font-face {
font-family: «DejaVu Sans»;
src: url(«fonts/DejaVuSans-BoldOblique.ttf»);
font-weight: bold;
font-style: italic, oblique;
}

Answers:

  1. Font style is set to italic, oblique.
  2. Font-weight is set to bold;
  3. Font-family is set to DejaVu Sans
  4. Multiple @font-face rules added.

75.Which of the following will add a border to a div element, without adding to its size in pixels?

Answers:

  1. div{
    box-sizing:border-box;
    -moz-box-sizing:border-box;
    -webkit-box-sizing:border-box;
    width:100px;
    height:100px;
    border:20px solid red;
    background:green;
    margin:10px;
    }
    div + div{
    border:10px solid red;
    }
  2. div{
    width:100px;
    height:100px;
    border:20px solid red;
    background:green;
    margin:-10px;
    }
    div + div{
    border:10px solid red;
    }
  3. div{
    width:100px;
    height:100px;
    border:20px solid red;
    background:green;
    padding:-10px;
    }
    div + div{
    border:10px solid red;
    }
  4. None of these.

76.Which of the following statements is true about z-index in CSS3?

Answers:

  1. «rem» is equal to «px».
  2. «rem» depends on the body’s font size.
  3. «rem» is independent from the body’s font size.
  4. «px» is the size of a pixel on a 96 DPI display, while «rem» is the size of a pixel at 72 DPI.

77.What is the default value of the transitions property?

Answers:

  1. all 0 ease 0
  2. all 0
  3. none
  4. 0

78.CSS3’s border-radius property and border-collapse:collapse do not mix. How can border-radius be used to create a collapsed table with rounded corners?

Answers:

  1. By using border-collapse: collapse
  2. By using border-collapse: separate
  3. By removing border-collapse:
  4. None of above.

79.CSS3’s border-radius property and border-collapse:collapse do not mix. How can border-radius be used to create a collapsed table with rounded corners?

Answers:

  1. It’s cross-browser.
  2. It’s not cross-browser.
  3. It will work only for class selector.
  4. It’s not possible in css3.

80.Which of the following requirements must be met in order to add noise to the background using CSS3?

Answers:

  1. A background image is needed.
  2. A background color is needed..
  3. Both a background image and a background color are needed.
  4. It not possible to add noise to a background using CSS3.

81. What should be the output of following code?
input[type=»radio»]:checked + label
{
background-color:#000;
}

Answers:

  1. Black background color apply on Radio button and label only if it is checked
  2. Black background color apply on Radio button and label
  3. Black background color apply on label only
  4. Black background color apply on checked label only

82. Consider the following HTML/CSS3 code:
HTML:
CSS:
#nav a {
background-color: #FF0;
}
#nav a:hover {
background-color: #AD310B;
-webkit-transition: background-color 1000ms linear;
-moz-transition: background-color 1000ms linear;
-o-transition: background-color 1000ms linear;
-ms-transition: background-color 1000ms linear;
transition: background-color 1000ms linear;
}
What will happen when the link is hovered?
Answers:

  1. The link background will fade out.
  2. The link color will change to #AD310B.
  3. The link background will fade in and change his color to #AD310B.
  4. None of the above.

83.Why is it not possible to unite webkit-border-radius and -moz-border-radius?

Answers:

  1. -webkit- and -moz- are vendor-specific prefixes and are not standard CSS3 properties.
  2. -webkit- and -moz- are standard CSS3 properties and are vendor-specific.
  3. -webkit- and -moz- are not standard CSS3 properties and not vendor-specific.
  4. None of these.

84.Which of the following code is appropriate to flip any background image?

Answers:

  1. div{
    -webkit-transform: rotate(-180deg);
    -moz-transform: rotate(-180deg);
    }
    div{
    -webkit-transform: rotate(-90deg);
    -moz-transform: rotate(-90deg);
    }
  2. div:before {
    content:» «;
    float:left;
    background:url(../../image.png) no-repeat 0 0;
    display:block;
    }
  3. div {
    -moz-transform: scaleX(-1);
    -o-transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
    filter: FlipH;
    -ms-filter: «FlipH»;
    width: 32px;
    height: 32px;
    }

85. Pseudo-classes can be used to

Answers:

  1. Style an element when a user mouses over it
  2. Style visited and unvisited links differently
  3. Style an element when it gets focus
  4. All

86. Which of the following are the newly introduced background properties in CSS3?

Answers:

  1. background-origin
  2. background-clip
  3. background-size
  4. All of the above

87. What is right way to set opacity of color to 50%?

Answers:

  1. color: rgb(0, 191, 255) 0.5;
  2. color: rgb(0, 191, 255) 50;
  3. color: rgba(0, 191, 255, 0.5);
  4. color: rgba(0, 191, 255, 50);

88. Is this statement right?
“Pixel is a static measurement, while percent and EM are relative measurements.”
Answers:

  1. Yes
  2. No

89. Which pair of CSS transforms results in same output

Answers:

  1. transform: scale(2, .5); and transform: scaleX(2);, transform: scaleY(.5);
  2. transform: rotate(20deg); and transform: rotateX(20deg);
  3. transform: skew(20deg); transform: skewY(20deg);
  4. transform: translate(20px, 50px); and transform: translateX(50px);, transform: translateY(20px);

90. What color would have text “Hello, Freelancer!”?
<style type=»“text/css”»>
#notification p { color: yellow; }
p.important { color: red; }
</style>
<div id=»notification»>
<p class=»important»>Hello, Frelancer!</p>
</div>

Answers:

  1. Yellow
  2. Red

91.What is the size of matrix used in 3D transformation?

Answers:

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

92. Which of these statements are true?

Answers:

  1. Padding is the space between content and the border of element.
  2. Padding is the space between content and the other element.
  3. Margin is the space outside of border.
  4. Margin is the space inside of element.

93. Which of these color definition is wrong?

Answers:

  1. color: rgb(0, 191, 255);
  2. color: #00bfff;
  3. color: DeepSkyBlue;
  4. color: hsl(195, 100%, 50%);
  5. None of these

94. Which of these selectors has the largest “weight”?

Answers:

  1. your div.awesome
  2. .your div#awesome
  3. #your div.awesome
  4. #your div#awesome

95. Which of these properties is not exists in CSS3?

Answers:

  1. translate
  2. rotate
  3. scale
  4. matrix
  5. All of these properties are exists

96. Which of the following are valid media features supported in media query? Check all that apply.

Answers:

  1. Max-width
  2. Aspect-ratio
  3. Background-color
  4. Orientation
  5. Color

97. Which of the following css will divide the text in the div element into 3 columns?

Answers:

  1. div {-webkit-column-count: 3; }
  2. div {-moz-column-count: 3; }
  3. div {column-count: 3; }
  4. All of the above

98. What does the following css code indicate?
columns: 2 auto;

Answers:

  1. column-width: auto;
  2. column-count: 2
  3. Both 1 and 2
  4. None

99. Which of these values are not valid for position property?

Answers:

  1. absolute
  2. fixed
  3. relative
  4. static
  5. All of these values are valid

100.How to select which placed immediately after

Answers:

  1. div> p
  2. div + p
  3. div ~ p
  4. p:after<div>

101.Which of the following is NOT a valid pseudo-class?

Answers:

  1. :active
  2. :hover
  3. :text
  4. :out-of-range

103.Which of the following statement is right?

Answers:

  1. Opacity sets the opacity value for an element and all of its children.
  2. RGBA sets the opacity value only for a single declaration.
  3. Both 1 and 2
  4. None of the above

103.Which of the following CSS works for “the gradient to start at the bottom left corner and go to the top right corner”

Answers:

  1. .gradient {
    background-image:
    linear-gradient(
    to bottom right,
    red, #f06d06
    );
    }
  2. .gradient {
    background-image:
    linear-gradient(
    to top left,
    red, #f06d06
    );
    }
  3. .gradient {
    background-image:
    linear-gradient(
    to right,
    red, #f06d06
    );
    }
  4. .gradient {
    background-image:
    linear-gradient(
    to top right,
    red, #f06d06
    );
    }

104.How many types of gradients are defined in CSS3?

Answers:

  • 2
  • 3
  • 1
  • 4

105.Which of the following are transition related properties in CSS3?
Check all that apply.
Answers:

  1. transition
  2. transition-delay
  3. transition-duration
  4. transition-timing-function
  5. transition-property

106. Which of these selectors are right for this paragraph?
<p class=»“styled-red”»>Hello!</p>.

Answers:

  1. p[class*=“styled”]
  2. p[class^=“styled”]
  3. p[class&=“styled”]
  4. p[class#=“styled”]

107.What is right way to transform text to uppercase?

Answers:

  1. text-transform: capitalize;
  2. text-transform: upcase;
  3. text-transform: uppercase;

108.How is possible to simplify this styles?
font-family: Georgia;
line-height: 1.4;
font-weight: normal;
font-stretch: normal;
font-variant: small-caps;
font-size: 16px;

Answers:

  1. font: small-caps normal normal 16px/1.4 Georgia;
  2. font: normal small-caps normal 16px/1.4 Georgia;
  3. font: 16px/1.4 Georgia normal small-caps normal;
  4. font: Georgia 16px/1.4 normal small-caps normal;

109.Which of the following are valid selectors? Check all that apply.

Answers:

  1. a[href^=»https»]
  2. p:empty
  3. input:file
  4. p:last-of-type

110.What does transform: matrix(2, 3, 0, 1, 0, 0); does?

Answers:

  1. Skews by 2 in x-direction and scales horizontally 3 times
  2. Scales horizontally 2 times and skews by 3 in x-direction
  3. Skews by 2 in y-direction and scales horizontally 3 times
  4. Scales horizontally 2 times and skews by 3 in y-direction

111. How to rotate element by 30deg in y-axis and z-axis?

Answers:

  1. transform: rotate3d(0, 30, 30)
  2. transform: rotate3d(0, 30, 1, 30)
  3. transform: rotate3d(0, 1, 1, 30)
  4. transform: rotate3d(1, 1, 1, 30)

112. In Descendant Selector , style is applied to element based on ____ .

Answers:

  1. whether element have sub element or not.
  2. whether element have only 2 sub elements or not
  3. whether element is of particular type or not
  4. None of These

113. The valid examples of ID selectors is/are

Answers:

  1. #black{color: #000000;}
  2. h1 #black{color: #000000;}
  3. #black h2{color: #000000;}
  4. All of the above

114. The CSS links properties are

Answers:

  1. :link, :visited, :hover, :active
  2. :link, :visit, :hover, :active
  3. :link, :visited, :over, :active
  4. :link, :visited, :hover, :active, :inactive

115.The different ways to associate styles with a HTML document is/are

Answers:

  1. Embedded CSS with <style>element
  2. Inline CSS with style attribute.
  3. External CSS with <link> element.
  4. All of the above

116. Which of these values are not valid for background-repeat property?

Answers:

  1. repeat-x
  2. repeat-y
  3. repeat-xy
  4. no-repeat

117. Custom fonts are defined by which of the following CSS3 rules?

Answers:

  1. @font
  2. @font-face
  3. @new-font
  4. @custom-font

118. What does the CSS3 style grid-column-start: 2; does?

Answers:

  1. Generates grid with 2 columns
  2. Creates a grid item on second column
  3. Starts grid item from second column
  4. Creates a 2×2 grid

119.Following Style is applied to —
div.wrapper h2
font-size: 18px;
margin-top: 0;

Answers:

  1. Type 2 Heading inside Element div of class wrapper.
  2. Type 2 Heading inside Element div with id wrapper.
  3. Type 2 Heading inside Element div of any class
  4. None Of These

120.Which of the following code is invalid for Font Size?

Answers:

  1. p { font-size: 1 ex; }
  2. p { font-size: 0ex; }
  3. p { font-size: 1; }
  4. p { font-size: 1ex; }
  5. p { font-size: 0; }

121.The …………………. property allows you to control the shape or style of bullet point in the case of unordered lists items, and the style of numbering characters in ordered list items.

Answers:

  1. list-style-type
  2. list-style-layout
  3. list-type-style
  4. list-type

122. Which of the following is True about responsive design of Media

Answers:

  1. @media (min-width: 800px) {
    body { background: white; }
    }
    @media (min-width: 401px , max-width: 799px) {
    body { background: black; }
    }
    @media (max-width: 400px) {
    body { background: blue; }
    }
  2. @media (min-width: 800px) {
    body { background: white; }
    }
    @media (min-width: 401px max-width: 799px) {
    body { background: black; }
    }
    @media (max-width: 400px) {
    body { background: blue; }
    }
  3. @media (min-width: 800px) {
    body { background: white; }
    }
    @media (min-width: 401px) and (max-width: 799px) {
    body { background: black; }
    }
    @media (max-width: 400px) {
    body { background: blue; }
    }
  4. @media (min-width: 800px) {
    body { background: white; }
    }
    @media (min-width: 401px) (max-width: 799px) {
    body { background: black; }
    }
    @media (max width: 400px) {
    body { background: blue; }
    }

123.Which of the following is/are the valid syntax for CSS pseudo classes.

Answers:

  1. selector:pseudo-class{property: value}
  2. selector.class:pseudo-class{property:value}
  3. Both A and B
  4. None of the above

124.The …………… rule is used to make sure that the property always be applied whether another property appears in CSS.

Answers:

  1. @important
  2. #important
  3. !important
  4. !first

124.The following syntax to set margin around a paragraph will make- p{margin:10px 2%}

Answers:

  1. Top and bottom margin will be 10px and left and right margin will be 2% of the total width.
  2. Left and right margin will be 10px and top and bottom margin will be 2% of the total height
  3. Top margin will be 10px and other margins will be 2% of the total width
  4. Left margin will be 10px and other margins will be 2% of the total width

125.The ………………. property indicates whether a cell without any content should have a border displayed.

Answers:

  1. border-layout
  2. border-decoration
  3. border-style
  4. border-weight

126. Which of the following statements is correct of Floating Elements?

Answers:

  1. Floating an element allows you to take that element out of normal flow and position it to the far left or right of a containing box
  2. The Floated element becomes a block-level element around which other content can flow
  3. Floating an element allows you to add that element in of normal flow and position it to the far left or right of a containing Div
  4. Floating and element in relation to the browser window, as opposed to the containing element

127. Which of the following is multi-column properties?

Answers:

  1. column-rule
  2. column-rule-count
  3. column-width
  4. column-span

128. The …………………. property allows to specify how much space appear between the content of an element and it’s border.

Answers:

  1. Spacing
  2. Marking
  3. Padding
  4. Content-border

129.How to resize a background image using CSS3?

Answers:

  1. background-size: 80px 60px;
  2. bg-dimensions: 80px 60px;
  3. background-proportion: 80px 60px;
  4. alpha-effect: bg-resize 80px 60px;

130. A CSS pseudo-class is a keyword added to selectors that specifies a special state of the element to be?

Answers:

  1. selected
  2. div
  3. element
  4. property

131.The text-indent property allows you to indent the first ____ of text within an element?

Answers:

  1. Letter
  2. Line
  3. Page
  4. All of the above

132. Which of the one code is correct about custom Fonts?

Answers:

  1. @font-face
    {
    font-family: MyFont;
    src: url(myfont.ttf);
    }
    p { font-family: «MyFont», arial, sans-serif; }
  2. @font-face
    {
    font-family: MyFont;
    src: url(myfont.ttf);
    }
    p { font-family: «MyFont» };
  3. @font-face
    {
    src: url(myfont.ttf);
    }
    p { font-family: «MyFont», arial, sans-serif; }
  4. @font-face
    {
    font-family: MyFont;
    }
    p { font-family: «MyFont», arial, sans-serif; }

133.Which of the following is 2D transformation methods?

Answers:

  1. rotateX()
  2. rotateY()
  3. rotateZ()
  4. None of the above

134.Which of the following is 2D transformation methods?

Answers:

  1. rotateX()
  2. rotateY()
  3. rotateZ()
  4. None of the above

135.What are the Full-length Properties?

Answers:

  1. border-top-width: thin;
    border-right-width: small;
    border-left-width: medium;
  2. border-top-width: thin;
    border-right-width: medium;
    border-bottom-width: thin;
    border-left-width: medium;
  3. border-right-width: medium;
    border-bottom-width: thin;
    border-left-width: high;
  4. border-top-width: thin;
    border-right-height: medium;
    border-bottom-height: thin;
    border-left width: medium;

136.The ……………………. property allows to specify the distance between the list and the text relating to the list.

Answers:

  1. list-spacing
  2. marker-spacing
  3. marker-offset
  4. list-offset

137.Screen Resolution refers to the number of dots a screen shows per?

Answers:

  1. Pixel
  2. Meter
  3. Inch
  4. Em

138.Pixels are relative to the resolution of the screen, so the same type size will look larger when a screen has a resolution of __ than it would when it is 1280×800?

Answers:

  1. 700×600
  2. 800×600
  3. 950×600
  4. 1020×600

139.Which of the following code is correct about Inset Border?

Answers:

  1. .border:hover
    {
    box-shadow: inset 0 0 0 25px #53a7ea;
    }
  2. .border:hover
    {
    box-shadow: inset 0 0 0 25 #53a7ea;
    }
  3. .border:hover
    {
    box-shadow: inset 0 0 0 color;
    }
  4. .border:hover
    {
    box-shadow: inset 0 0 0 25px effect;
    }

140.Which of the following code is incorrect about Gradients Syntax?

Answers:

  1. background: linear-gradient(direction, color-stop1, color-stop2, …);
  2. background: linear-gradient(angle, color-stop1, color-stop2);
  3. background: radial-gradient(shape size at position, start-color, …, last-color);
  4. None of the above

141. Internet Explorer uses ………………….. property to create transparent images.

Answers:

  1. -moz-opacity:x
  2. filter: alpha(opacity=x)
  3. Both of the above
  4. None of the above

142. How can we use Multiple backgrounds using the following code?

Answers:

  1. background-image: url(bg1.png), url(bg2.png);
    background-repeat: repeat, repeat-y;
    background-attachment: fixed, fixed;
    background-position: right bottom, top left;
  2. background-image: url(bg1.png), url(bg2.png);
    background-repeat: no-repeat, repeat-y;
    background-attachment: fixed, fixed;
    background-position: right bottom, top left;
  3. background-image: url(bg1.png), url(bg2.png);
    background-repeat: no-repeat;
    background-attachment: fixed, fixed;
    background-position: right bottom, top left;
  4. background-image: url(bg1.png), url(bg2.png);
    background: no-repeat, repeat-y;
    background-attachment: fixed, fixed;
    background-position: right bottom, top left;

142. Which of the following is 3D transformation methods?

Answers:

  1. matrix()
  2. translate()
  3. scale()
  4. rotateX() , rotateY() , rotateZ()

143. Which of the following is used to represent Visited hyperlink.

Answers:

  1. :visited
  2. :clicked
  3. :focus
  4. :link

144.Fonts such as Times New Roman which have spaces in between must be wrapped inside __

Answers:

  1. Quotation Mark
  2. Round Brackets
  3. Triangular Brackets
  4. Curly Braces

145.Liquid _____ designs stretch and contract as the user increases or decreases the size of their browser window?

Answers:

  1. html
  2. layout
  3. css
  4. web

146. Fixed width layout designs do not change size as the user increases or decreases the size of their _____ window?

Answers:

  1. page
  2. browser
  3. div
  4. All of the above

147.Which of these statements are true?

Answers:

  1. A block-level element always starts on a new line and takes up the full width available.
  2. An inline element does not start on a new line and only takes up as much width as necessary.
  3. A block-level element always starts on a new line and only takes up as much width as necessary.
  4. A block-level element can be placed into inline elements.

148.Which of these statements are true?

Answers:

  1. A block-level element always starts on a new line and takes up the full width available.
  2. An inline element does not start on a new line and only takes up as much width as necessary.
  3. A block-level element always starts on a new line and only takes up as much width as necessary.
  4. A block-level element can be placed into inline elements.

149.Using the following code you will remove margin from .float-wrapper?

Answers:

  1. .float-wrapper { margin-bottom:0; }
  2. .float-wrapper { margin-bottom:none; }
  3. .float-wrapper { margin-bottom:1; }
  4. .float-wrapper { margin-bottom:5; }

150.What does the A stand for in RGBA?

Answers:

  1. Alpha
  2. Aqua
  3. About
  4. Approximate

151.Using the following code you will empty-cells of table?

Answers:

  1. empty-cells : show | hide
  2. empty-cells : inherit | show | remove
  3. empty-cells : inherit | show | hide
  4. empty-cells : inherit | show | none

30,299 total views, 29 views today