Online Test CSS 2

Online Test CSS 2

  1. Orphans
  2. Widows
  3. Bottom
  4. Overflow
  5. None of the above
Answer: Answer is a
Further Reading:
Useful resources, orphans

a:link {color: green}
a:visited {color: blue}
a:hover {color: red}
a:active {color: black}
What will be the color, when the mouse goes over a link?
  1. Green
  2. Blue
  3. Red
  4. Black
Answer: Answer is c

  1. snap
  2. clip
  3. scroll
  4. visible
Answer: Answer is b
Further Reading:
Useful resources, clip

  1. vertical-align: super
  2. vertical-align: superscript
  3. vertical-align: top
Answer: Answer is a
Further Reading:
Useful resources, superscript

Which of the following is the best style definition if you are targeting all the paragraphs?
  1. par {letter-spacing: 3px; word-spacing: -5px}
  2. par{letter-spacing: -0.8px; word-spacing: 25px}
  3. p {l-spacing: 3px; w-spacing: -5px}
  4. p {letter-spacing: -0.8px; word-spacing: 25px}
Answer: Answer is d
Further Reading:
Useful resources, letter-spacing

.redborder {
border-color:#ff0000;
border-width:thin thick
}
What type of border will be displayed if one of the paragraphs defined in the webpage uses this style?

  1. This will display a red border with thin top and bottom
  2. This will display a red border with thick top and bottom
  3. This will display a red border with thick left and right
  4. This will not display any border
Answer: Answer is d
Further Reading:
This will not display any border, because border style is not specified.

  1. font-weight
  2. font-variant
  3. font-size-adjust
  4. font-size
Answer: Answer is c
Further Reading:
Useful resources, font-size-adjust-prop

  1. Image will have zero width and height so it will be hidden.
  2. Image will be positioned at the upper left corner.
  3. Image will be positioned at the lower right corner
  4. None of the above
Answer: Answer is b
Further Reading:
Useful resources, background-position

td#aln {
text-align: center;
color: blue
}
How will you refer to this style in your web page?
  1. By using the class attribute on a td cell
  2. By using the id attribute on a td cell
  3. By using the class attribute on any HTML element which supports the class attribute
  4. By using the id attribute on any HTML element which supports the id attribute
Answer: Answer is b

  1. visible
  2. hidden
  3. scroll
  4. auto
Answer: Answer is a, b, c, d
Further Reading:
Useful resources overflow

  1. Yes
  2. No
Answer: Answer is a
Further Reading:
To override a in line style, use !important rule. Useful resources, !important

  1. When using CSS, positioning can be absolute, relative or dynamic
  2. The float property for text/images can be left, right or center
  3. The values for visibility can be true or false
  4. The display property sets how an element is displayed
Answer: Answer is d
Further Reading:
Useful resources, display property

  1. blockquote { text-padding: 2em 4em 5em }
  2. blockquote { padding-x: 2em 4em 5em }
  3. blockquote { padding-y: 2em 4em 5em }
  4. blockquote { padding: 2em 4em 5em }
Answer: Answer is d
Further Reading:
Useful resources, padding-properties

  1. expanded
  2. inline-table
  3. table-row
  4. table-column-group
Answer: Answer is a
Further Reading:
Useful resources, display property

  1. wait
  2. pointer
  3. text
  4. image
Answer: Answer is d
Further Reading:
Useful resources, ‘cursor’ property

#styl2 { color: red; }
How will you refer to this style in your web page?
  1. By using the class attribute in a td cell
  2. By using the class attribute in any HTML element which supports the class attribute
  3. By using the id attribute in any HTML element which supports the 'id' attribute
Answer: Answer is c

  1. When you are creating pages for older versions of Netscape Navigator
  2. When you don't want older browsers like IE4 or Netscape 4 to use the style sheet
  3. When you want to include a css file in another css file
  4. There is no such technique available for applying style sheets
Answer: Answer is b, c
Further Reading:
Useful resources, at-import ruleat-import

  1. list-style-type
  2. list-style-position
  3. list-style-image
  4. list-style-align
Answer: Answer is d
Further Reading:
Useful resources, list-style

h2, h4, h5, h6 { color: cyan; }
Which of the following is correct for the above definition?
  1. Grouping of tags is not allowed in the style definition
  2. The style definition should span a single line
  3. Grouping tags should be separated by semicolons
  4. You can group as many tags as you like
Answer: Answer is d
Further Reading:
Useful resources, grouping

  1. Yes
  2. No
Answer: Answer is a



p strong {color: green; }
  1. All strong text and all paragraph text will be displayed in green color
  2. All paragraphs that are contained within <strong></strong> tags will be displayed in green color
  3. All strong text that is contained in a paragraph will be displayed in green color
  4. Only the paragraph text will be displayed in green color
  5. Only the strong text will be displayed in green color
  6. The style definition is erroneous and will not be applied to any element of the webpage
Answer: Answer is b

  1. scroll
  2. visible
  3. hidden
  4. auto
Answer: Answer is b
Further Reading:
Useful resources, overflow

  1. It uses a hash as the separator symbol
  2. It applies the style to only the first element defined with that style
  3. It applies the style to only the last element defined with that style
  4. It applies the style to all the elements defined with that style
Answer: Answer is d
Further Reading:
Useful resources, class

  1. When font size is set to 46pt, the height of the letter 'x' will be 100pt
  2. When font size is set to 100pt, the height of the letter 'x' will be 46pt
Answer: Answer is b
Further Reading:
Useful resources, aspect-value

  1. @media screen, print {  span.med{font-weight:bold}  }
  2. .media screen, print {  span.med{font-weight:bold}  }
  3. .media screen print {  span.med{font-weight:bold}  }
  4. #media screen, print {  span.med{font-weight:bold}  }
Answer: Answer is a
Further Reading:
Useful resources, at-media-rule

  1. normal, wider, narrower
  2. normal, italic, oblique
  3. normal, bold, lighter
  4. small, medium, large
Answer: Answer is b
Further Reading:
Useful resources, font-style

  1. link
  2. active
  3. lang
  4. ins
Answer: Answer is d
Further Reading:
Useful resources, pseudo-classes

td.right {text-align: right}
td.left {text-align: left}
Which of the following is the right way to use them in an HTML page?
  1. <td class="td.right">Some Text</td>
  2. <td class="right" class="left">Some Text</td>
  3. <td class="td.left" class="td.right">Some Text</td>
  4. <td class="right">Some Text</td>
Answer: Answer is b

BODY {background: url('banner.jpeg') right top}
What is the percentage of the background-position?
  1. 0% 0%
  2. 0% 100%
  3. 100% 0%
  4. 100% 100%
Answer: Answer is c
Further Reading:
Useful resources, background-position

p,i { color:red }
What do you understand about the contextual selector used above?
  1. All the text within a paragraph will be italicized
  2. All the italic text in the page will have red color
  3. All the page text under <p></p> tag and <i></i> tag will be red
  4. All the italic text within a paragraph will be red
Answer: Answer is c




  1. Set negative z-index for the image
  2. Set positive z-index for the image
  3. Set negative x-index for the image
  4. Set positive x-index for the image
Answer: Answer is a
Further Reading:
Useful resources, z-index



Share this article :

Post a Comment

 
Copyright © 2014. Mominul's Diary - All Rights Reserved
Developed by Mominul Islam