Objective Questions on CSS Syntax and Property set-6

Objective Questions on CSS Syntax and Property set-6


1) ....... media type is used for use with printed material and documents viewed onscreen in print preview mode.

A. Print

B. Projection

C. Aural

D. Screen



2) In CSS length measurement unit ....... defines a measurement in picas.

A. pi

B. pc

C. pt

D. px



3) In CSS length measurement unit ......defines a measurement in screen pixel.

A. pi

B. pc

C. pt

D. px




4) ........ defines a measurement relative to a font's x-height. The x-height is determined by the height of the font's lowercase letter x.

A. cm

B. em

C. ex

D. hx




5) Which of the following is the correct CSS code to set the background color of all h1, h2 and h3 elements to orange.

A. h1.h2.h3{background-color:orange;}

B. h1, h2, h3{background-color:orange;}

C. h1 h2 h3{background-color:orange;}

D. h1, h2, h3{set-background:orange;}




6) The CSS selector E>F selects ...

A. direct decedents

B. adjacent siblings

C. preceding siblings

D. all elements



7) The CSS selector E-F selects .....

A. direct decedents

B. adjacent siblings

C. preceding siblings

D. all elements



8) ........... selects all elements of E that have an attribute attr that starts with the value given in a list of hyphen-separated values.

A. E[attr-=value]

B. E[attr|=value]

C. E[attr~=value]

D. E[attr^=value]



9) .......... selects all elements of E that have the attribute attr that begins with the given value.

A. E[attr-=value]

B. E[attr|=value]

C. E[attr~=value]

D. E[attr^=value]



10) A single @charset rule can be used in a/an ........... to define character set encoding of the style rules and values.

A. external sheet

B. internal sheet

C. inline codes

D. Both A and B




11) An ......... rule can be used to define style rules for multiple media types in a single embedded style sheet.

A. @embedded

B. @media

C. @page

D. @multiple



12) An ........... rule is used to define a page block for printed styles. Generally, within this construct we see various CSS properties like size, page, and margin to control the dimensions of the page.

A. @embedded

B. @media

C. @page

D. @print



13) Which of the following are the sub properties of background property used in CSS Except.

A. background-color

B. background-scroll

C. background-image

D. background-repeat



14) Which of the following is the default value of background-image property in CSS.

A. url

B. inherit

C. none

D. both A and B



15) State whether the following statements are True or False.

i) Background-position property determines how a background image is positioned within the canvas space by associated element.

ii) The default value for background-attachment property is fixed.

iii) The background image requires a URL(complete or relative) to link it to the source image specified with the url() syntax.

A. i-True, ii-True, iii-False

B. i-True, ii-False, iii-False

C. i-False, ii-True, iii-True

D. i-True, ii-False, iii-True



16) Which of the following is/are the sub properties of border property in CSS.

A. border-width

B. border-style

C. border-color

D. All of the above



17) Match the following CSS cursor resizing property with their descriptions.

i) e-resize a) pointing north south.

ii) ne-resize b) pointing northwest-southeast

iii) nw-resize c) pointing northeast-southwest

iv) n-resize d) pointing east-west(left-right)

A. i-d, ii-c, iii-b, iv-a

B. i-c, ii-b, iii-a, iv-d

C. i-b, ii-c, iii-d, iv-a

D. i-d, ii-a, iii-b, iv-c



18) ......... property controls how spaces, tabs, and newline charters are handled in an element.

A. visibility

B. white-space

C. tab-space

D. line-space



19) ......... property controls the algorithm used to lay out the table, cells, rows, and columns.

A. table-layout

B. cell-layout

C. row-column-layout

D. None of the above



20) ......... property is used to force or prohibit a printing page break within an element.

A. page-break-outside

B. page-break-inside

C. printing-page-break

D. page-break-element


Answers:

1) A. Print
2) B. pc
3) D. px
4) C. ex
5) B. h1, h2, h3{background-color:orange;}
6) A. direct decedents
7) C. preceding siblings
8) B. E[attr|=value]
9) D. E[attr^=value]
10) A. external sheet
11) B. @media
12) C. @page
13) B. background-scroll
14) C. none
15) D. i-True, ii-False, iii-True
16) D. All of the above
17) A. i-d, ii-c, iii-b, iv-a
18) B. white-space
19) A. table-layout
20) B. page-break-inside
478f8ffac419307280ec7a8194f9ee837ed62daf3f47597227


Related Posts:

For more Multiple Choice Questions (MCQs): Click Here

Solved Multiple Choice Questions on Basic CSS set-5

Solved Multiple Choice Questions on Basic CSS set-5


1) All of the following statement about CSS styles are True Except.

A. External style sheets can set and update styles for many documents at once.

B. In inline style, it can be easily control style to a single character instance.

C. In some cases @import is used in inline styles

D. There is no additional network requests required to retrieve style information.



2) ............. requires extra download round-trip for t he style sheet, which might delay page rendering, particularly when multiple files are in use.

A. External Style Sheets

B. Document Wide Style

C. Inline Style

D. All of the above



3) For .............., it needs to reapply style information throughout the document and outside documents.

A. External Style Sheets

B. Document Wide Style

C. Inline Style

D. All of the above



4) Which of the following is the correct example of document wide style in CSS.

A. <h1 style="color:red;"> I am red !</h1>

B. <h1 color="red"> I am red ! </h1>

C. <style type="text/css" media="all"> h1{color:red;}</style>

D. <style type="stylesheet" media="all"> h1{color:red;}</style>



5) .......... overrides any document styles in the absence of !import directive.

A. Document Wide Style

B. Inline Style

C. External Style Sheets

D. All of the above



6) Which of the following statements are True about the types of CSS stylesheets.

i) Document wide style can easily control style document by document.

ii) Document wide style needs additional network requests to retrieve style information.

iii) With external style sheets, style information is cached by the browser, so there's no need to repeat.

A. i-True, ii-True, iii-False

B. i-True, ii-False, iii-True

C. i-True, ii-False, iii-False

D. i-False, ii-True, iii-True



7) Media type defined under CSS 2.1 for use with low resolution teletypes, terminals, or other devices with limited display capabilities is

A. tt

B. tv

C. ttd

D. tty



8) Which of the following is/are the media types defined in CSS.

A. aural

B. embossed

C. print

D. All of the above



9) As defined in CSS2 ........ selects all elements of E that have a space separated list of values for attr where one of those values is equal to the given value.

A. E[attr~=value]

B. E[attr|=value]

C. E[attr=value]

D. All of the above



10) Which of the following selector selects all elements of E that have the attribute attr that ends with the given value in CSS3.

A. E[attr#=value]

B. E[attr$=value]

C. E[attr^=value]

D. E[attr!=value]




11) Which of the following CSS code sets the font style to italic on all p tags that have one word in their title equal to test.

A. p[title~="Test"]{font-style:italic;}

B. p[title|="Test"]{font-style:italic;}

C. p[title="Test"]{font-style:italic;}

D. p[title^="Test"]{font-style:italic;}



12) Which of the following CSS code sets the font-weight to bold on all a tags that have their href attribute set to http://www.siteforinfotech.com

A. a[href*="http://www.siteforinfotech.com"]{font-weight:bold;}

B. a[href~="http://www.siteforinfotech.com"]{font-weight:bold;}

C. a[href$="http://www.siteforinfotech.com"]{font-weight:bold;}

D. a[href="http://www.siteforinfotech.com"]{font-weight:bold;}



13) Match the following CSS selectors with their respective definitions.

i) a:link a) specifies the link as it is being pressed.

ii) a:active b) specifies the link after being pressed

iii) a:visited c) specifies the unvisited link

A. i-a, ii-c, iii-b

B. i-b, ii-a, iii-c

C. i-c, ii-a, iii-b

D. i-a, ii-c, iii-b



14) The following CSS code strong:first-of-type{font-size: bigger;}

A. sets the font size bigger on the first strong tag of its parent.

B. sets the font size bigger on all of the strong tag of its parent.

C. sets the font size bigger on the strong tag if only the child of its parent.

D. None of the above options.



15) Which of the following selector is not defined in CSS3.

A. :root

B. :empty

C. :not(a)

D. :lang(value)



16) Which of the following is/are the sub properties of borders property in CSS.

i) border

ii) border-top

iii) border-top-style

iv) border-bottom-position

v) border-top-width

A. i, ii, iv and v

B. ii, iii, iv and v

C. i, ii, iii and v

D. iii, iv and v



17) Which of the following is not the CSS propery to display the generated content.

A. conter-reset

B. counter-stop

C. counter-increment

D. content



18) The CSS properties page-break-before, page-break-after, page, and size are included in which CSS property.

A. print property

B. print preview property

C. page setup property

D. All of the above



19) Which of the following is/are the sub properties of background property in CSS.

A. background-color

B. background-image

C. background-attachment

D. All of the above



20) In CSS3, ......... selects an element that has no children.

A. :not(a)

B. :empty

C. :root

D. :lang(value)


Answers:


1) C. In some cases @import is used in inline styles
2) A. External Style Sheets
3) C. Inline Style
4) C. <style type="text/css" media="all"> h1{color:red;}</style>
5) B. Inline Style
6) B. i-True, ii-False, iii-True
7) D. tty
8) D. All of the above
9) A. E[attr~=value]
10) B. E[attr$=value]
11) A. p[title~="Test"]{font-style:italic;}
12) D. a[href="http://www.siteforinfotech.com"]{font-weight:bold;}
13) C. i-c, ii-a, iii-b
14) A. sets the font size bigger on the first strong tag of its parent.
15) D. :lang(value)
16) C. i, ii, iii and v
17) B. counter-stop
18) A. print property
19) D. All of the above
20) B. :empty


Related Posts:

For more Multiple Choice Questions (MCQs): Click Here