CSS 2.0 Test


Question 1: 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


Question 2: The 'font-stretch' property selects a normal, condensed, or extended face from a font family. Which of the following keyword values are incorrect?
    

    a)     extra-condensed
    b)     condensed
    c)     micro-condensed
    d)     extra-expanded
    e)     macro-expanded




Question 3:
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
    b)     Statement 2 is correct but statement 1 is incorrect
    c)     Both statements are correct
    d)     Both statements are incorrect


Question 4:

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
    c)     It applies the style to only the last element defined with that
selector
    d)     It applies the style to all the elements defined with that selector


Question 5:

You have defined 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 the style definition?

    a)     p:first-only
    b)     p:first-line
    c)     p.first-line
    d)     p:first




Question 6:
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
    d)     Style definition in the head tag


  Question 7:
You want to increase the space between the lines in all your paragraphs.
What will you use?

    a)     p{ width:1cm}
    b)     p{ height: 1cm}
    c)     p{ line-height: 1cm}
    d)     p{ line-width: 1cm}


  Question 8:
You defined a style to left align 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
    d)     The style is incomplete without a prefixed element tag name
   


Question 9:
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 }


  Question 10:
You have to display an image behind an absolutely positioned paragraph text. Which of the following will you use?

    a)     Set negative z-index for the image
    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 11:
When would you prefer to use the @import technique for applying a style sheet to your web page?

    a)     When you are creating pages for older versions of Netscape Navigator
    b)     When you don't want older browsers like IE4 or Netscape 4 to use the style sheet
    c)     When you want to include a css file in another css file
    d)     There is no such technique available for applying style sheets 



Question 12:
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 roman numbering, Which style will you use?

    a)     list-style
    b)     list-style-type
    c)     list-marker
    d)     list-style-marker
    e)     list-bullet
    f)     list-style-bullet


  Question 13:
Which of the following font properties deals with aspect value?

    a)     font-weight
    b)     font-variant
    c)     font-size-adjust
    d)     font-size


  Question 14:
The following is a style definition:

#styl2
{
color: red;
}

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 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



Question 15:
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}  }
    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 16:The following is a sample style:

1. p
2. (
3. font-family:arial
4. color:black
5. text-align:left
6. );
What correction is required in the above style?

    a)     The style definition should be enclosed in curly braces
    b)     Multiple items within a style should be separated by ";"
    c)     The style should not close with a semicolon
    d)     p should be followed by an equal-to sign


Question 17:

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">
    c)     <style name=''stylesheet'' url=''ssa.css''>



Question 18:
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%
    d)     100% 100%


  Question 18:
Which of the following is not a valid text-decoration option?

    a)     text-decoration:line-through
    b)     text-decoration:in-line
    c)     text-decoration:overline
    d)     text-decoration:underline
    e)     text-decoration:none 


Question 19:

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
    b)     list-style-marker
    c)     list-marker
    d)     list-style-graphic
    e)     list-bullet
    f)     list-style-image


  Question 20:
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 paragraphs that are contained within <strong></strong> tags will be displayed in green color
    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 webpage


Question 21:

Which element property is required to define internal styles?

    a)     class
    b)     style
    c)     span
    d)     link


Question 22:

Which element property is required to define internal styles?

    a)     class
    b)     style
    c)     span
    d)     link
 

Question 23:

Can you define multiple styles for the same HTML element/tag or selector?

    a)     Yes
    b)     No



Question 24:The default value for the overflow property is:


    a)     scroll
    b)     visible
    c)     hidden
    d)     auto



Question 25:
Read the following statements:
@page rotated {size: landscape}
TABLE {page: rotated; page-break-before: right}
What does this code do?

    a)     It will put all tables on a right-hand side landscape page
    b)     It will rotate the page if the table is positioned at the right side
    c)     It will keep the table in landscape position and rotate the page
    d)     None of the above


Question 26:

Which of the following is not a valid property of an aural style sheet?

    a)     cue
    b)     voice-family
    c)     loud
    d)     speak
    e)     All of the above are valid.



Question 27:

Which of the following does not apply to external styles?

    a)     Clean Separation of Design & Content
    b)     Minimal Code Duplication
    c)     Highest priority
    d)     Reduces page download time


Question 28:

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
    c)     text-decoration
    d)     text-shadow
    e)     text-case 


Question 29:

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?

    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


Question 30:

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 tags as you like



Question 31:
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?

    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>


  Question 32:
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 on a td cell
    b)     By using the id attribute on a td cell
    c)     By using the class attribute on any HTML element which supports the class attribute
    d)     By using the id attribute on any HTML element which supports the id attribute 



Question 33:
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 for visibility can be true or false
    d)     The display property sets how an element is displayed


Question 34:

Your webpage contains several unordered lists:

  * Item A
  * Item B
  * Item C
  * Item D
  * Item E
  * Item F
  * Item G
...
The style sheet for these lists is:
ul {list-style-type: disc}
Due to some reason, you now want all the unordered list items to be numbered. What minimum change in your CSS/HTML will do this?

    a)     Replace all ul with ol in the HTML page
    b)     Set list-style-type:number in the CSS
    c)     Set list-style-type:decimal in the CSS
    d)     Set list-style-type:integer in the CSS


  Question 35:
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 effect it.
    d)     None of the above



Question 36:
Which style property can be used to display only some part of an image?

    a)     snap
    b)     clip
    c)     scroll
    d)     visible


  Question 37:
Which style will always be over-ridden if you are using style definitions in the <head> tag, linked stylesheets using the <link..> tag and imported stylesheets using the @import method, provided same the style is defined using each of these techniques.

    a)     The in-line style
    b)     The style definition in the tag
    c)     The linked stylesheet
    d)     The imported stylesheet @import


  Question 38:
Which of the following is not a pseudo class?

    a)     link
    b)     active
    c)     lang
    d)     ins


  Question 39:
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 

  Question 40:

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

Comments

Popular posts from this blog

371 - Ackermann Functions

Create many folder with one click