Which of the following declarations can be used to cover the whole background?
a. body{
b. background: red url("test.gif");
c. background-repeat: repeat-y;
d. background-attachment: fixed;
e. }
g. body{
h. background: red url("test.gif");
i. background-repeat: repeat-x;
j. background-attachment: fixed;
k. }
m. body{
n. background: red url("test.gif");
o. background-repeat: no-repeat;
p. background-attachment: fixed;
q. }
s. body{
t. background: red url("test.gif");
u. background-repeat: repeat;
v. background-attachment: fixed;
w. }
y. body{
z. background-image: url("test.gif");
aa. background-repeat: space;
bb.}
Answer: Answer is d, e
The sans-serif generic font-family is characterized by:
- finish strokes, flared or tapering ends, or actual serifed endings.
- stroke endings that are plain without any flaring, cross stroke, or other ornamentation.
- either join strokes or other cursive characteristics beyond those of italic typefaces.
- primarily decorate the characters while still containing their representations.
Answer: Answer is b
Further Reading:
Useful resources, sans-serif
Which of the following is not a user interface element fragment selector?
- Value
- Choices
- Default
- repeat-item
- repeat-index
Answer: Answer is c
Further Reading:
Useful resources, Features at risk
What will happen if the cursor property value is set to none?
- The default cursor will be displayed.
- No cursor will be displayed.
- A pointer cursor will be displayed.
- A text cursor will be displayed.
Answer: Answer is b
Further Reading:
Useful resources, ‘cursor’ property
@page rotated {size: landscape}
TABLE {page: rotated; page-break-before: right}
What will this code do?
- It will put all tables on a right-hand side landscape page.
- It will rotate the page if the table is positioned at the right side.
- It will keep the table in the landscape position and rotate the page.
- None of the above
Answer: Answer is a
Further Reading:
Useful resources, Using named pages: 'page'
Which of the following is not a valid value for the font-stretch property?
- Condensed
- Normal
- semi-narrower
- expanded
- semi-expanded
Answer: Answer is c
Further Reading:
Useful resources, font-stretch property
Which of the following does not apply to external styles?
- Clean separation of design and content
- Minimal code duplication
- Highest priority
- Reduced page download time
Answer: Answer is c
Consider the following code:
Shane Mathew
9843423232
What will be the output if the name and the number end up on different lines?
- Shane Mathew....
...9843423232 - Shane Mathew____
___9843423232 - Shane Mathew
9843423232 - Shane Mathew---
---9843423232
Answer: Answer is b
Further Reading:
Useful resources, leaders (example 16)
A/An___________ is defined with 'grid-columns', 'grid-rows' properties?
- Explicit grid
- Natural grid
- Default grid
- None of the above
Answer: Answer is a
Further Reading:
Useful resources, grid declarations
Can a percentage value be given in a ruby-align property?
- Yes
- No
Answer: Answer is b
Further Reading:
Useful resources, ruby-align property
What will happen if the following style declaration is used in the given HTML code?
HTML code:
Box 1.
Box 2.
- Two boxes will be stacked one on another.
- Box 1 will be on the left hand side and Box 2 will be on the right hand side horizontally.
- Box 2 will be on the left hand side and Box 1 will be on the right hand side horizontally.
- Both boxes will overlap each other.
Answer: Answer is a
Further Reading:
Both
box has exact 50% width and 1em border. Border will be added with
height and width. So each box will be stacked instead of standing
horizontally.
What will be the output of the following rule?
em {
color: rgba(0,0,255,1)
}
- Opacity 1 with solid red color
- Opacity 0 with solid blue color
- Opacity 0 with solid red color
- Opacity 1 with solid blue color
- None of the above
Answer: Answer is d
Further Reading:
Useful resources, rgba-color
Consider the following code
body
{
text-replace: "a" "b" "b" "c";
}
What will be the output of the following string if you implement the text-replace style?
andy lives behind café
- bndy lives behind cbfe
- cndy lives cehind ccfe
- andy lives behind café
- andy lives cehind bafe
Answer: Answer is b
Further Reading:
All ‘a’ characters are converted to ‘b’. Subsequently, all ‘b’ characters are converted to ‘c’. Useful resources, text-replace
What is the initial value of the font-size property?
- Small
- Medium
- Large
- Default
Answer: Answer is b
Further Reading:
Useful resources, font-size property
What is the range of values (in decimal notation) that can be specified in the RGB color model?
- 0 to 256
- 0 to 255
- -250 to 250
- -255 to 255
Answer: Answer is b
Further Reading:
Useful resources, rgb-color
If
the nav-index property of textbox1 is set to 10, that of textbox2 to 5
and that of textbox3 to 8, what will be the navigation order?
- textbox1, textbox2 ,textbox3
- textbox2, textbox3 ,textbox1
- textbox3, textbox2 ,textbox1
- textbox1, textbox3 ,textbox2
Answer: Answer is b
Further Reading:
Useful resources, nav-index property
Which of the following display values assign ruby semantics to an arbitrary element as given below?
ruby-text (in XHTML: rt)
- It specifies that an element defines a ruby base.
- It specifies that an element contains one or more ruby bases.
- It specifies that an element defines a ruby text.
- It specifies that an element contains one or more ruby texts.
- It specifies that an element defines a ruby structure.
Answer: Answer is c
Further Reading:
Useful resources, css ruby model
What is the initial value of the opacity property?
- 0
- 1
- Normal
- None
Answer: Answer is b
Further Reading:
Useful resources, opacity property
To which of the following elements can the min-width property not be applied?
- Button
- Span
- table row
Answer: Answer is c
Further Reading:
Minimum width can’t be applied to non-replaced inline elements, table rows, and row groups. Useful resources, min-width
You
want to set the image resolution to 300dpi irrespective of the
resolution of the image. Which of the following codes will be used?
- img { image-resolution: auto }
- img { image-resolution: auto, 300dpi }
- img { image-resolution: 300dpi }
- None of the above
Answer: Answer is c
Further Reading:
Useful resources, image-resolution
If you are using the white-space-collapse property with value collapse, what will be the output of the following string?
John leads his team to the victory, but fails to reach the finals.
- Johnleadshisteamtothevictory,butfailstoreachthefinals.
- John leads his team to the victory, but fails to reach the finals.
- John leads his team to the victory, but fails to reach the finals.
- John leads his team to thevictory, but fails to reach thefinals.
Answer: Answer is b
Further Reading:
The color in three digit RGB notation is #fb0. What will be its equivalent six digit color code?
- #fb0fb0
- #ffbb00
- #fbfb00
- None of the above
Answer: Answer is b
Further Reading:
Useful resources, CSS Color Module
Which of the following is not a valid value for the font-smooth property?
- Auto
- Never
- Always
- Normal
- length
Answer: Answer is d
Further Reading:
Useful resources, font-smooth property
What is the default value of the transform property in CSS3?
- 50% 50%
- 0% 0%
- 100% 100%
- none
Answer: Answer is d
Further Reading:
Useful resources, transform property
Which
of the following value of the white-space property will set the value
of white-space-collapse to "preserve" and value of the text-wrap to
"none"?
- normal
- pre
- nowrap
- pre-wrap
- pre-line
Answer: Answer is b
Further Reading:
Useful resources, white-space
Which of the following styles is not valid for an image?
- img { float= left }
- img { float: left here }
- img { background: "black" }
- img { border-width: 10 }
- All of the above
Answer: Answer is e
Further Reading:
In
a, ‘=’ sign is invalid. In b, ‘here’ word is invalid. Similarly, in c,
use or ‘quotation’ for black is invalid and for option d, there is ‘no
mention of unit’ for border-width.
You
want to float an image to the top of the next-page. Which of the
following styles will help you to achieve the desired result?
- img { float: next-page; }
- img { float: top-corner next-page; }
- img { float: next-page top; }
- b and c
Answer: Answer i
Further Reading:
Useful resources, float-modifiers
backface-visibility:hidden; will this property hide the back side of a transformed div element?
- Yes
- No
Answer: Answer is a
Further Reading:
Which of the following is not a valid page break?
- page-break-inside
- page-break-outside
- page-break-before
- page-break-after
- None of the above
Answer: Answer is b
Further Reading:
Which of the following properties allow percentages in their value fields?
- font-size
- font-variant
- font-weight
- line-height
Answer: Answer is a
What is the maximum value that can be given to the voice-volume property?
- 0
- 10
- 100
- 500
- None of the above
Answer: Answer i
Further Reading:
Useful resources, voice-volume
Which of the following styles is valid?
- border: "none";
- border= "none";
- border: none;
- border= none;
- None of the above
Answer: Answer is c
Further Reading:
Useful resources, border-properties
Which of the following are not valid values for the target-new property?
- Window
- Tab
- None
- Parent
- current
Answer: Answer is d, e
Further Reading:
Useful resources, target-new property
What will happen if the following declaration is used?
body
{
background-image: url("test.png");
background-attachment: fixed;
background-position: 100% 100%;
background-repeat: no-repeat;
}
- The image will be shown in the background at the bottom left corner.
- The image will be shown in the background at the bottom right corner.
- The image will be shown in the background at the top left corner.
- The image will be shown in the background at the top right corner.
- The image will be shown in the center of the page.
Answer: Answer is b
Further Reading:
Useful resources, background
Which of the following rules is equivalent to the em { color: rgb(255,0,0) } style?
- em { color: rgb(300,0,0) }
- em { color: rgb(255,-10,0) }
- em { color: rgb(110%, 0%, 0%) }
- em { color: rgb(100%, 0%, 0%) }
- All of the above
Answer: Answer is e
Further Reading:
Values
outside the device gamut should be clipped or mapped into the gamut
when the gamut is known: the red, green, and blue values must be changed
to fall within the range supported by the device.
em { color: rgb(255,0,0) } /* integer range 0 - 255 */
em { color: rgb(300,0,0) } /* clipped to rgb(255,0,0) */
em { color: rgb(255,-10,0) } /* clipped to rgb(255,0,0) */
em { color: rgb(110%, 0%, 0%) } /* clipped to rgb(100%,0%,0%) */
Useful resources, rgb
What will happen if the value of the transform-style property is set to flat and the element has children?
- The element will be shown with 3D effect but the children will be rendered flattened into the 2D plane.
- The element will be shown with 2D effect but the children will be rendered into the 3D plane.
- Both the element and its children elements will be rendered in 3D effect.
- Both the element and its children elements will be rendered in 2D effect.
Answer: Answer is a
Further Reading:
Which of the following is the initial value for the column-fill property?
- Auto
- Balance
- none
Answer: Answer is b
Further Reading:
Useful resources, column-fill
Which of the given options is/are equivalent to the following rule?
DIV { line-height: 1.2; font-size: 10pt }
- DIV { line-height: 1.2em; font-size: 10pt }
- DIV { line-height: 12em; font-size: 10pt }
- DIV { line-height: 120%; font-size: 10pt }
- DIV { line-height: 20%; font-size: 10pt }
- DIV { line-height: 80%; font-size: 10pt }
Answer: Answer is a, c
Consider the following code and say what will happen if you click on More?
@media print {
.footnote {
float: footnote;
content: target-move(attr(href, url))
}
.marker {
display: none
}
}
.footnote {
float: footnote;
content: target-move(attr(href, url))
}
.marker {
display: none
}
}
HTML code:
- The tool tip will appear saying Great poet too.
- A pop up will appear saying Great poet too.
- The page will shift focus to the line Great poet too.
- Nothing will happen.
Answer: Answer is d
Further Reading:
Useful resources, footnotes
Which of the following property doesn't take up space?
- Outline
- Border
- Both a and b
Answer: Answer is a
Further Reading:
Which
of the following properties specifies the minimum number of lines of a
paragraph that must be left at the bottom of a page?
- Orphans
- Widows
- Bottom
- Overflow
- None of the above
Answer: Answer is a
Further Reading:
Useful resources, orphans
What is the initial value of the marquee-speed property?
- Slow
- Normal
- Fast
- none
Answer: Answer is b
Further Reading:
Useful resources, marquee-speed
If the following rule is used, what will be the output?
:focus,:active { outline-offset: 10px }
- The focus outline will appear at a distance of 10 pixels from the active element.
- The width of the focus outline will be 10 pixels.
- No outline will be shown.
Answer: Answer is a
Further Reading:
Useful resources, outline-offset
What is the initial value of the hyphens property?
- None
- Manual
- Auto
- default
Answer: Answer is b
Further Reading:
Useful resources, hyphens property
Consider the following font definition
font-weight:normal
What is the other way of getting the same result?
- font-weight:100
- font-weight:900
- font-weight:400
- font-weight:700
Answer: Answer is c
Further Reading:
Useful resources, font-weight
What will happen if the following style declaration is applied to an element?
p { margin: 3em 2em }
- The top and the bottom margins will be 3em and the left and the right margins will be 2em.
- The top and the bottom margins will be 2em and the left and the right margins will be 3em.
- The top and the left margins will be 3em and the bottom and the right margins will be 2em.
- The top and the right margins will be 2em and the bottom and the left margins will be 3em.
Answer: Answer is a
Further Reading:
Useful resources, margins
What will happen if the pause property is used as follows?
h2 { pause: 40s 60s }
- pause-before will be set to 40 seconds and pause-after will be set to 60 seconds.
- pause-after will be set to 40 seconds and pause-before will be set to 60 seconds.
- pause-after and pause-before will be set to 40 seconds.
- pause-after and pause-before will be set to 60 seconds.
Answer: Answer is a
Further Reading:
Useful resources, pause-props
If you set the value of the speak property to digits, how would 22 be spoken?
- twenty two
- two two
- twenty and two
- four
Answer: Answer is b
Further Reading:
Useful resources, speaking-props
State whether following statement is true or false?
The RGB color model is hardware-specific while the HSL is symmetrical to lightness and darkness.
- True
- False
Answer: Answer is a
Further Reading:
Useful resources, hsl-color
Which of the given rules would result in an object being rendered as below?
- div { content: '1' } div::before { content: '2'; } div::before::before { content: '3'; }
- div { content: '3' } div::before { content: '2'; } div::before::before { content: '1'; }
- div { content: '1' } div::before { content: '2'; } div::before(2) { content: '3'; }
- div { content: '3' } div::before { content: '2'; } div::before(2) { content: '1'; }
Answer: Answer is a
Further Reading:
Useful resources, nesting
Which of the following option does NOT exist in media groups available in CSS3?
- continuous or paged
- visual or tactile
- grid or bitmap
- braille or screen
Answer: Answer is d
Further Reading:
Useful resources, media groups
What effect does the following rule have?
div { grid-rows: 4em (0.25em 1em); }
- It creates rows with 4em height.
- It creates a header row with 4em height and alternative rows with 0.25em width and 1em heights.
- It creates a header row with 4em height and alternative rows with 0.25em and 1em heights.
- It creates a header row with 4em width and alternative rows with 0.25em width and 1em heights.
Answer: Answer is c
Further Reading:
Useful resources, grid- rows examples IV
For the clear property, which of the following value is not valid?
- None
- Left
- Right
- Top
Answer: Answer is d
Further Reading:
Useful resources, clear property
What is the initial value of the animation-iteration-count property?
- 0
- 1
- 5
- None
Answer: Answer is b
Further Reading:
Useful resources, animation-iteration-count-property
What is the problem in the following style sheet?
@import "style.css";
@media print {
@import "print-main.css";
BODY { font-size: 10pt }
}
h1 {
color: red
}
- Two style sheets can't be included with @import.
- The body tag can't be included inside @media.
- @import rule is invalid since it occurs inside a @media block.
- It is valid.
Answer: Answer is c
Further Reading:
Useful resources, at-rules
What is the type of the letter-spacing property?
- Length
- Number
- Percentage
- integer
Answer: Answer is a
Further Reading:
Useful resources, letter-spacing
What is the initial/ default value of the text-align property?
- Start
- End
- Left
- Right
- Center
- justify
Answer: Answer is a
Further Reading:
Useful resources, text-align property
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.
- True
- False
Answer: Answer is a
Odesk Test CSS 2
Which
of the following properties specifies the minimum number of lines of a
paragraph that must be left at the bottom of a page?
- Orphans
- Widows
- Bottom
- Overflow
- None of the above
Answer: Answer is a
Further Reading:
Useful resources, orphans
You defined some links as follows
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
Which style property can be used to display only some part of an image?
- snap
- clip
- scroll
- visible
Answer: Answer is b
Further Reading:
Useful resources, clip
How will you display text as a superscript?
- vertical-align: super
- vertical-align: superscript
- vertical-align: top
Answer: Answer is a
Further Reading:
Useful resources, superscript
While
displaying some text on a web page you want to increase the spacing
between the words and bring the letters within the word closer to each
other
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
Here is one of the styles defined in your webpage?
.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.
Which of the following font properties deals with aspect value?
- font-weight
- font-variant
- font-size-adjust
- font-size
Answer: Answer is c
Further Reading:
Useful resources, font-size-adjust-prop
Background-position sets the position of the background image. What happens if its value is 0%0%?
- 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
The following is a style definition
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
Which of the following are correct values of the overflow property?
- visible
- hidden
- scroll
- auto
Answer: Answer is a, b, c, d
Further Reading:
Useful resources overflow
Is it possible to force a style definition in a linked stylesheet to over-ride an in-line style definition?
- Yes
- No
Answer: Answer is a
Further Reading:
To override a in line style, use !important rule. Useful resources, !important
Which of the following statement is correct
- 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
Which of the following is correct?
- 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
Which of the following is not a correct keyword value for the display property?
- expanded
- inline-table
- table-row
- table-column-group
Answer: Answer is a
Further Reading:
Useful resources, display property
Which of the following cursor types is not valid?
- wait
- pointer
- text
- image
Answer: Answer is d
Further Reading:
Useful resources, ‘cursor’ property
The following is a style definition
#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 would you prefer to use the @import technique for applying a style sheet to your web page?
- 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:
Which of the following is not a valid list property?
- list-style-type
- list-style-position
- list-style-image
- list-style-align
Answer: Answer is d
Further Reading:
Useful resources, list-style
You have the following style definition
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
Can you define multiple styles for the same HTML element/tag or selector?
- Yes
- No
Answer: Answer is a
All strong text and all paragraph text will be displayed in green color?
p strong {color: green; }
- All strong text and all paragraph text will be displayed in green color
- All paragraphs that are contained within 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
The default value for the overflow property is?
- scroll
- visible
- hidden
- auto
Answer: Answer is b
Further Reading:
Useful resources, overflow
Which of the following is true for a class selector?
- 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
The font "Times New Roman" has an aspect value of 0.46. What do you understand from this?
- 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
You
want to define the same media style for both print and screen media.
Which of the following is the correct structure for the style?
- @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
Which of the following values are correct for font-style?
- normal, wider, narrower
- normal, italic, oblique
- normal, bold, lighter
- small, medium, large
Answer: Answer is b
Further Reading:
Useful resources, font-style
Which of the following is not a pseudo class?
- link
- active
- lang
- ins
Answer: Answer is d
Further Reading:
Useful resources, pseudo-classes
You defined two styles as follows
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?
- Some Text
- Some Text
- Some Text
- Some Text
Answer: Answer is b
The following is a style definition
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
Consider this style definition
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
tag and tag will be red - All the italic text within a paragraph will be red
Answer: Answer is c
You have to display an image behind an absolutely positioned paragraph text. Which of the following will you use?
- 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
Further Reading:
Useful resources, z-index