Monday 3 June 2013

Odesk Test Answer For CSS 2

Question 1:
The following is a sample style:
P
(
Font-family:arial
Color:black
Text-align:left
);
What correction is required
in the above style?
a. The style definition should be enclosed in curly braces <=Answer
b. Multiple items within a style should be separated by “;” <=Answer
c. The style should not close with a semicolon
d. P should be followed by an equal-to sign
Question  2:
 Which style property
can be used to display only some part of an image?
a. Snap
b. Clip
c. Scroll <=Answer
d. Visible
Question 3:
You want to display a list of items on your webpage using
the <li> tag instead of bullets. You want each list element to be marked
by a small graphic that you have created. Which style could you use?
a. List-style <=Answer
b. List-style-image <=Answer
c. List-style-marker
d. List-marker
e. List-style-graphic
f. List-bullet
Question 4:
 Which of the
following is correct?
 a.
Blockquote{text-padding:2em 4em 5em}
 b.
Blockquote{padding-x:2em 4em 5em}
 c.
Blockquote{padding-y:2em 4em 5em}
 d.
Blockquote{padding:2em 4em 5em}  <=Answer
Question 5:
Which of the following is true for a class selector?
 a. It uses a hash as
the separator symbol
 b. It applies the
style to only the first element defined with that style
 c. It applies the
style to only the last element defined with that style
 d. It applies the
style to all the elements defined with that style <=Answer
Question  6:
 Which of the following
is true for an ID selector?
 a. It uses a dot as
the separator symbol
 b. It applies the
style to only the first element defined with that selector  <=Answer
 c. It applies the
style to only the last elements defined with that selector
 d. It applies the
style to all the elements defined with that selector 
Question  7:
You developed a website using HTML and style sheets. You
defined a style for the H4 tag within the head tag , in the imported style
sheet and in-line. Which style definition will be used when the page is seen in
a browser?
a. Default browser  H4
definition
b. External  style
sheet definition
c. Inline style definition <=Answer
d. Style definition in the head tag
Question  8:
You have to display an image behind an absolutely position
paragraph text. Which of the following will you see?
a. Set negative z-index for the image <=Answer
b. Set positive z-index for the image
c. Set negative x-index for the image
d. Set positive x-index for the image
Question 9:
 You are fetching
customer names from a database. The names in the database are mostly in
lowercase. What is the name of the text property which will facilitate
capitalization of these names?
 a. Text-mode
 b. Text-transform <=Answer
 c. Text-decoration
 d. Text-shadow
 e. Text-case
Question 10:
The following is a style definition:
 Td#aln
 {text-align:center;
 color:blue}
 How will you refer to
this style in your web page?
  A. by using the class attribute
in a td cell
  B. by using the id Attribute in
a td cell
<=Answer
  C. by using the class attribute
in any html element which supports the
class attribute
  D. by using the id attribute in
any html element which support the id attribute
Question 11:
Which of the following is not a valid property of an aural
style sheet?
 a. Cue
 b. Voice-family
 c. Load <=Answer
 d. Speak
Question 12:
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?
a. @media screen, print{ span.med{font-weight:bold}} <=Answer
b. media screen, print{ span.med{font-weight:bold}}
c. media screen
print{ span.med{font-weight:bold}}
d. #media screen, print{ span.med{font-weight:bold}}
Question 13:
You want to increase the space between the lines in all you
paragraphs. What will you use?
 a. P{width:1cm}
 b. P{height: 1cm}
 c. P{line-height:1cm} <=Answer
 d. P{line-width:1cm}
Question 14:
Which of the following Statement is correct?
 a. When using css,
positioning can be absolute, relative or dynamic
 b. The float Property
for text/images can be left, right or center
 c. The values of
visibility can be true or False
 d. The display
Property sets how an element is displayed
<=Answer
Question 15:
The following is a style definition:
#styl2
{
Color:red;
}
How will the refer to this style in your webpage?
a. By using the class attribute in a  td cell
b. By using the class attribute in any HTML element which
supports the class attribute
c. By using the id attribute in any HTML element which
supports the “id” attribute <=Answer
Question 16:
You have define a p tag style as follows:
P{color:#ff0000;
   Font-variant:
small-caps;
}
You want the above style to work only on the first line of
the paragraph. What modification will you make to style definition?
a. P:first-only
b. P:first-line <=Answer
c. P.first-line
d. P:first
Question 17:
How will you display text as a superscript?
 a. Vertical-align:
super  <=Answer
 b. Vertical-align:
superscript
 c. Vertical-align :
top
Question 18:
Which of the following is not a valid page break?
a. Page-break-inside
b. Page-break-outside <=Answer
c. Page-break-before
d. Page-break-after
Question 19:
Which of the following attribute can be used to supersede
any of the contradictory style with equal weight?
a.!supersede
b.!high
c.!important <=Answer
d.!key
Question 20:
Which of the following are correct values of the overflow
property?
 a. Visible <=Answer
 b. Hidden <=Answer
 c. Scroll <=Answer
 d. Auto <=Answer
4 answers
Question 21:
Which of the following is not a pseudo class?
a. Link
b. Active
c. Lang
d. Ins <=Answer
Question 22:
The default value for the overflow property is:
 a. Scroll
 b. Visible <=Answer
 c. Hidden
 d. Auto
Question 23:
Which of the following does not apply to external styles?
 a. Clean separation
of design & content
 b. Minimal code
duplication
 c. Highest priority <=Answer
 d. Reduces page
download time
Question 24:
Which of the following font properties deals with aspect
value?
 a. Font-weight <=Answer
 b. Font-variant
 c. Font-size-adjust
 d. Font-size
Question 25:
Which of the following cursor types is not valid?
a. Wait
b. Pointer
c. Text
d. Image <=Answer

Question 26:
Is it possible to force a style definition in a linked style
sheet to over-ride an in-line style definition?
a. Yes <=Answer
b. no
Question 27:
Which of the following is correct with regard to comments in
a style sheet?
 a. Comments can
appear outside the style definition only
 b. Comments start
with//
 c. Comments end with
*/ <=Answer
 d. Comments are not
permitted in a style sheet
Question 28:
Paged media differ from continuous media in that the content
of the document is divided into one or more pages. When you set the dimensions,
which of the following will be applied?
 a. The dimensions of
the page area are the dimensions of the page box minus the margin area
 b. The dimensions of
the page area are the dimensions of the page box plus the margin area
 c. The dimensions of
the page area are the dimensions of the page box and margin area does not
affect it.
 d. None of the above <=Answer
Question 29:
How will you link a style sheet named “ssa.css” in your web
page?
a. <import name=”stylesheet” url=”ssa.css”>
b. <link rel=”stylesheet” type=”text/css”
href=”ssa.css”> <=Answer
c. <style name=”stylesheet” url=”ssa.css”>
Question 30:
this question is based upon the figure shown
Text text text text
 A Text text
 Sentence text text
 Inside text text
 A text ext
 Text text text
 Text text
 Text text text text
 You have and article
of 100 lines. If for instance, you want to describe the theme with a few lines
inside the text highlighted separately as show in the image which of the
following property will you use?
 a. Outline
 b. Display
 c. Float <=Answer
 d. Merge
Question 31:
You want to display a table whose cell borders are as per
the following rules:
1. Left border should be double
2. Right border should be dashed
3. Top border should be dotted
4. Bottom border should be solid
Choose the correct style definition:
a. Border-style: double dotted dashed solid
b. Border-style: dotted dashed solid double <=Answer
c. Border-style: dashed
double dotted solid
d. Border-style: solid
double dotted dashed
Question 32:
Which of the following properties specifies the minimum
number of lines of a paragraph that must be left at the bottom of a page?
 a. Orphans
 b. Widows
 c. Bottom
 d. Overflow
 e. None of the above<=Answer
Question 33:
The font “Time New Roman” has an aspect value of 0.46. what
do you understand from this?
a. When font size is set to 46pt, the height of the letter
‘x’ will be 100pt <=Answer
b. When font size is set to 100pt, the height of the letter
‘x’ will be 46pt
Question 34:
Which of the following is not true for a style sheet?
 a. A style sheet
defines how an html element will be displayed
 b. Internal and
external style sheets can not be used together <=Answer
 c. Multiple style
definitions will cascade into one
 d. The same style
sheet can be used by many html pages
Question 35:
Which of the following are valid css text properties in
CSS2.0?
a. Direction
b. Text-transform <=Answer
c. Text-indent  <=Answer
d. Text-height
Question 36:
Which style will always be over-ridden if you are using
style definitions in the tag, linked style sheets using the tag and imported
Your ads will be inserted here by
Easy AdSense.
Please go to the plugin admin page to paste your ad code.
style sheets using the @import method, provided the same style is defined using
each of these techniques.
a. The in-line style
b. The style definition in the tag <=Answer
c. The linked style sheet
d. The imported style sheet @import
Question 37:
You are designing a web site and need to set the background
Image for all the web pages. You want a small background image to repeat and
fill up the whole background. Which of the following body styles is ideal for
this?
a.Body{background: url(/image/bd.gif);
           repeat: repeat-x;}
b. Body{background: url(/image/bd.gif);
        
repeat: repeat-y;}
c. Body{background: url(/image/bd.gif);
         
background -repeat: no-repeat;}
d. Body{background: url(/image/bd.gif);
          background – repeat: repeat;}  <=Answer
 
Question 38:
Which element property is required to define internal
styles?
 a. Class
 b. Style  <=Answer
 c. span
 d. link
Question 39:
The following is a style definition:
Body{background: url(“banner.jpeg”) right top}
What is the percentage of the background-position
a.0%  0%
b.0%  100%
c.100%  0%  <=Answer
d.100%  100%
Question 40:
Which of the following is not a valid property of an aural
style sheet?
 a. Cue
 b. Voice-family
 c. Load <=Answer
 d. Speak
e. All of the above are valid
Question 41:
What is the effect of the following style:
p strong {color: green;}
a. All strong text and all paragraph text will be displayed
in green color
b. All paragraph that are contained within
<strong></strong> tags will be displayed in green
 color <=Answer
c. All strong text that is contained in a paragraph will be
displayed in green color
d. Only the paragraph text will be displayed in green color
e. Only the strong text will be displayed in green color
f. The style definition is erroneous and will not be applied
to any element of the web page
Question 42:
Which of the following is true for a class selector?
 a. It uses a hash as
the separator symbol
 b. It applies the
style to only the first element defined with that style
 c. It applies the
style to only the last element defined with that style
 d. It applies the
style to all the elements defined with that style <=Answer
Question 43:
when would you prefer to use the @import technique for
applying a style sheet to your page?
a. when you are creating pages for older version of Netscape
Navigator
b. when you don’t want older browser like IE4 or Netscape 4
to use the style sheet <=Answer
c. when you want to include a css file in another css file <=Answer
d. there is no such technique available for applying style
sheets
Question 44:
You defined to 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?
a.<td class=”td.right”>Some text</td>
b.<td class=”right”
class=”left”>Some text</td>
c.<td class=”td.left”
class=”td.right”>Some text</td>
d.<td class=”right”>Some text</td> <=Answer
Question 45:
Paged media differ form continuous media in that the content
of the document is divided into on e or more pages. When you set the
dimensions, which of the following will be applied?
a. The dimensions of the page area are the dimensions of the
page box minus the margin area
b. The dimensions of the page area are the dimensions of the
page box plus the margin area
c. The dimensions of the page area are the dimensions of the
page box and margin area does not affect it
d. None of the above <=Answer

Question 46:
Here is one of the styles defined in your webpage:
.redborder
{border-color: #ff0000;
Border-width: thin thick;
}
What types of border will be displayed if one of the
paragraphs defined in the webpage uses this style?
a. This will display a red border with thin top and bottom
b. This will display a red border with thick top and bottom
c. This will display a red border with thick left and right
d. This will not display any border <=Answer

Question 47:
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?
 a. Green
 b. Blue
 c. Red <=Answer
 d. Black
Question 48:
Which of the following is not valid text-decoration option?
a. text-decoration: line-through
b. text-decoration: in-line <=Answer
c. text-decoration: overline
d. text-decoration: underline
e. text-decoration: none
Question 49:
You are fetching customer names from a database. The names
in the database are mostly in lowercase. What is the name of the text property
which will facilitate capitalization of these names?
 a. Text-mode
 b. Text-transform <=Answer
 c. Text-decoration
 d. Text-shadow
 e. Text-case
Question 50:
Read the following statements:
Statement 1: vertical margins between a floated box and any
other box do not collapse
Statement 2: margins of absolutely and relatively positioned
boxes collapse
Which of the following is correct?
a. Statement 1 is correct but statement 2 is incorrect <=Answer
b. Statement 2 is correct but statement 1 is incorrect
c. Both statement are correct
d .Both statement are incorrect
Question 51:
Which of the following border styles is not correct?
a. Border-style: ridge
b. Border-style: outset
c. Border-style: dotted
d. Border-style: matted <=Answer
Question 52:
Which of the following options regarding page media groups
is wrong?
a. Continuous/paged
b. Visual/audio/speech/tactile
c. Grid/bitmap
d. Dynamic/interactive/static <=Answer

Question 53:
You defined a style to left the text:
 .left{text-align:
left}
Select the correct statement:
a. The style can be applied to any element in the HTML page
b. The style can be applied using the ID attribute
c. The style can be applied using the CLASS attribute <=Answer
d. The style is incomplete without a prefixed element tag
name
Question 55:
Which of the following is not a valid list property?
a. List-style-type
b. List-style-position
c. List-style-image
d. List-style-align <=Answer

Question 54:
Background-position sets the position of the background
image. What happens if its value is 0% 0%?
a. Image will have zero width and height so it will be
hidden.
b. Image will be positioned at the upper left corner. <=Answer
c. Image will be positioned at the upper right corner.
d. None of the above.

Question 56:
You have the following style definition:
 h2, h4, h5, h6
{
Color: cyan;
}
Which of the following is correct for the above definition?
a. Grouping of tags is not allowed in the style definition
b. The style definition should span a single line
c. Grouping tags should be separated by semicolons
d. You can group as many as tags you like  <=Answer

Question 57:
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?
a. Par{letter-spacing: 3px; word-spacing: -5px;}
b. Par{letter-spacing: -0.8px; word-spacing: 25px;}
c. P{l-spacing: 3px; w-spacing: -5px;}
d. P{letter-spacing: -0.8px; word-spacing: 25px;} <=Answer
Question 58:
Which of the following does not apply to external styles?
 a. Clean separation
of design & content
 b. Minimal code
duplication
 c. Highest priority <=Answer
 d. Reduces page
download time

Question 59:
Your website displays some articles on java programming. The
articles contain blocks of java code as well. If you want to leave ‘1 cm’ space
above and below the code blocks, you would use:
 a. Code{margin:1cm}
 b.
Code{margin-top:1cm; margin-bottom:1cm} <=Answer
 c. P{margin:1cm}
 d. P{margin-top:1cm;
margin-bottom:1cm}
Question 60:
Which element property is required to define internal
styles?
 a. Class
 b. Style <=Answer
 c. span
 d. link
Question 61:
You want to increase the space between the lines in all you
paragraphs. What will you use?
 a. P{width:1cm}
 b. P{height: 1cm}
 c. P{line-height:1cm} <=Answer
 d. P{line-width:1cm}
Question 62:
The font-family property is used to specify a:
 a. Family name
 b. Generic Family
 c. Family name and
/or generic Family <=Answer
Question 63:
Which of the following is not a correct keyword value for
the display property?
 a. Expended   <=Answer
 b. Inline-table
 c. Table-row
 d. Table-column-group
Question 64:
Which of the following is true for an ID selector?
 a. It uses a dot as
the separator symbol
 b. It applies the
style to only the first element defined with that selector  <=Answer
 c. It applies the
style to only the last elements defined with that selector
 d. It applies the
style to all the elements defined with that selector 
Question 65:
Which of the following values are correct for Font-style?
 a. Normal, wider,
narrower
 b. Normal , italic,
oblique  <=Answer
 c. Normal, bold,
lighter
 d. Small, medium ,
large
Question 66:
When are you likely to use an id selector in your style
sheet?
a. When you want to apply the style to elements that appear
repeatedly on a page
b. When you want to apply the style to only one element per
page <=Answer
c. The id selector is just like the class selector
d. It is better to use the class selector instead
Question 67:
Consider this style definition:
  p, i{color:red}
 What do you
understand about the contextual selector used above?
 a. All the text
within a paragraph will be italicized
 b. All the italic
text in the page will have red color
 c. All the page text
under <p></p> tags and <i></i> tag will be red <=Answer
 d. All the italic
text with in a paragraph will be red
Question 68:
Consider the following font definition:
Font-weight:bold
What is the other way of getting the same result?
a. Font-weight: b
b. Font-weight: bolder
c. Font-weight: bld
d. Font-weight: 700 <=Answer
 Question 69:
 Read the following
Code:
 BODY {
 Background: white
url(“bar.gif”);
 Background-repeat:
repeat-y;
 Background-position:
center;
 }
 What will be the
output of this code?
 a. Image bar.gif will
be tiled vertically in the background in the center of the page. <=Answer
 b. Image bar.gif will
be tiled horizontally in the background in the center of the page
 c. Image bar.gif will
be displayed in the center of the page
 d. Image bar.gif will
be stretched in the center of the page

No comments:

Post a Comment