Online Test CSS 2
- Orphans
- Widows
- Bottom
- Overflow
- 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?
- Green
- Blue
- Red
- Black
Answer: Answer is c
- snap
- clip
- scroll
- visible
Answer: Answer is b
Further Reading:
Useful resources, clip
- vertical-align: super
- vertical-align: superscript
- 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?
- par {letter-spacing: 3px; word-spacing: -5px}
- par{letter-spacing: -0.8px; word-spacing: 25px}
- p {l-spacing: 3px; w-spacing: -5px}
- 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?
- This will display a red border with thin top and bottom
- This will display a red border with thick top and bottom
- This will display a red border with thick left and right
- This will not display any border
Answer: Answer is d
Further Reading:
This will not display any border, because border style is not specified.
- font-weight
- font-variant
- font-size-adjust
- font-size
Answer: Answer is c
Further Reading:
Useful resources, font-size-adjust-prop
- Image will have zero width and height so it will be hidden.
- Image will be positioned at the upper left corner.
- Image will be positioned at the lower right corner
- 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?
- By using the class attribute on a td cell
- By using the id attribute on a td cell
- By using the class attribute on any HTML element which supports the class attribute
- By using the id attribute on any HTML element which supports the id attribute
Answer: Answer is b
- visible
- hidden
- scroll
- auto
Answer: Answer is a, b, c, d
Further Reading:
Useful resources overflow
- Yes
- No
Answer: Answer is a
Further Reading:
To override a in line style, use !important rule. Useful resources, !important
- When using CSS, positioning can be absolute, relative or dynamic
- The float property for text/images can be left, right or center
- The values for visibility can be true or false
- The display property sets how an element is displayed
Answer: Answer is d
Further Reading:
Useful resources, display property
- blockquote { text-padding: 2em 4em 5em }
- blockquote { padding-x: 2em 4em 5em }
- blockquote { padding-y: 2em 4em 5em }
- blockquote { padding: 2em 4em 5em }
Answer: Answer is d
Further Reading:
Useful resources, padding-properties
- expanded
- inline-table
- table-row
- table-column-group
Answer: Answer is a
Further Reading:
Useful resources, display property
- wait
- pointer
- text
- 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?
- By using the class attribute in a td cell
- By using the class attribute in any HTML element which supports the class attribute
- By using the id attribute in any HTML element which supports the 'id' attribute
Answer: Answer is c
- When you are creating pages for older versions of Netscape Navigator
- When you don't want older browsers like IE4 or Netscape 4 to use the style sheet
- When you want to include a css file in another css file
- There is no such technique available for applying style sheets
Answer: Answer is b, c
Further Reading:
Useful resources, at-import rule, at-import
- list-style-type
- list-style-position
- list-style-image
- 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?
- Grouping of tags is not allowed in the style definition
- The style definition should span a single line
- Grouping tags should be separated by semicolons
- You can group as many tags as you like
Answer: Answer is d
Further Reading:
Useful resources, grouping
- Yes
- No
Answer: Answer is a
p strong {color: green; }
- All strong text and all paragraph text will be displayed in green color
- All paragraphs that are contained within <strong></strong> tags will be displayed in green color
- All strong text that is contained in a paragraph will be displayed in green color
- Only the paragraph text will be displayed in green color
- Only the strong text will be displayed in green color
- The style definition is erroneous and will not be applied to any element of the webpage
Answer: Answer is b
- scroll
- visible
- hidden
- auto
Answer: Answer is b
Further Reading:
Useful resources, overflow
- It uses a hash as the separator symbol
- It applies the style to only the first element defined with that style
- It applies the style to only the last element defined with that style
- It applies the style to all the elements defined with that style
Answer: Answer is d
Further Reading:
Useful resources, class
- When font size is set to 46pt, the height of the letter 'x' will be 100pt
- 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
- @media screen, print { span.med{font-weight:bold} }
- .media screen, print { span.med{font-weight:bold} }
- .media screen print { span.med{font-weight:bold} }
- #media screen, print { span.med{font-weight:bold} }
Answer: Answer is a
Further Reading:
Useful resources, at-media-rule
- normal, wider, narrower
- normal, italic, oblique
- normal, bold, lighter
- small, medium, large
Answer: Answer is b
Further Reading:
Useful resources, font-style
- link
- active
- lang
- 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?
- <td class="td.right">Some Text</td>
- <td class="right" class="left">Some Text</td>
- <td class="td.left" class="td.right">Some Text</td>
- <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?
- 0% 0%
- 0% 100%
- 100% 0%
- 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?
- All the text within a paragraph will be italicized
- All the italic text in the page will have red color
- All the page text under <p></p> tag and <i></i> tag will be red
- All the italic text within a paragraph will be red
Answer: Answer is c
- Set negative z-index for the image
- Set positive z-index for the image
- Set negative x-index for the image
- Set positive x-index for the image
Answer: Answer is a
Post a Comment