Upwork CSS Test 2018

Upwork CSS Test Answers 2018

40 Answered Test Questions:

1) Which of the following are valid selectors? Check all that apply.
a)a [href^=”https”]
b)p:empty
c)input: file
d)p: last-of-type

2) Which if the following are valid multi- column properties? Check all that apply.
a)Column- count
b)Column- gap
c)Column –rule – style

3)The ………………………… specifies whether a border should be solid, dashed line, dotted line, double line, groove etc.
a)Birder – layout
b)Border – decoration
c)Border – style
d)Border – weight

4) Which of the following in not a valid media feature supported in media query?
 a)Background – color
 b)Max – width
 c)Color
 d)Orientation

5) What is right way to select every 4th paragraph?
a) P: nth – of – each (4)
b) P: nth – of -each (4n)
c) P: nth – of -each (4n)
d) P: nth – of- type (4n)

6) Which of the following is Not a valid pseudo – class?
a)  : active
b) : hover
c ) : text
d) : out-of- range

7) Which of the following are true about Flexible Box? Check all that apply.
a)Flex box consists of flex containers and flex items
b)Inside a flex container there is one or more flex items.
c)It is not possible to change the direction of the flex line.
d)The align – items property vertically aligns the flexible container’s items when the items do not           use all available space on the cross – axis.

8) Which of the following are multi- column properties?
a) Column- rule
b) Column-rule-count
c) Column-width
d) Column-span

9) The style given below is applied to which of the given options?
   -Wrapper sub#2 {Font- size: 18px;Margin – top: 0;}
a) Div Element with class wrapper and Type 2 Heading inside it with ID sub.
b) Type 2 Heading with ID sub inside Element P with class wrapper.
c) Type 2 Heading inside wrapper with ID sub.
d) All of the above

10) Which of the following is not a valid media type for media query?
a)All
b) Print
c) Screen
d)Small
e) Speech

11) The……………………………. Property indicates whether a cell without any content should have a border displayed.
a)Blank-cells
b)Empty-cells
c)no content- cells
d)no border- cells

12) Which of the following is Not a valid 20 transformation method?
a) Translate ( )
b) Rotatex ( )
 c) Skewx ( )
d) Scale ( )


13) Which of the following is the correct way to add multiple background I mages to an element?
a)Background- image : url (img_ 1. Png, img_ 2. Png)
b)Background – image: url (image_ 1.png) , url (img_2 .png);
c)Background- image: [url (img_ 1.png) , url (img _2. Png];
d)Both 2 and 3
14) The …………………….. property allows to specify the distance between the list and the text relating to the list.
a)List –spacing
b)Marker – spacing
c)Marker- offset
d)List- offset

15) The box model in CSS is made up of :
a)Margin, border, padding,  content
b)Margin, border, padding
c)Margin, padding, content
d)Margin, border, content

16) Which of the following is valid for grid- column –start: 3?
a)Generates grid with 3 columns
b)Creates a grid item on third column
c)Starts grid item from third column
d)Creates a 3x3 grid

17) Why is it not possible to unite webkit-border – radius and –moz- border- radius?
a)-webkit- and –moz- are vendor- specific prefixes and are not stanadard CSS3 properties.
b)-webkit- and –moz- are standard CSS3 properties and are vendor – specific.
c)-webkit – and – moz – are not standard CSS3 properties and not vendor – specific.
d)None of these.

18) Which of these statements are true?
Note: There may be more than one right answer.
a)A block- level element always starts on a new aline and takes up the full width available.
b)An inline element does not start on a new line and only takes up as much width as necessary.
c)A block- level element always starts on a new line and only takes up as much width as necessary.
d)A block – level element can be placed into inline elements.

19) You can set border- box for all Elements using the following code?
a)Html, body {-Webkit- box- sizing: border- box;
  Box- sizing: border- box;}
b)Div {-Webkit- box- sizing: border- box;
  Box- sizing: border- box;}
c)*{-Webkit- box- sizing: border- box;
  -moz-box-sizing: border- box;Box-
    sizing : border- box;}
d)P{-Webkit- box- sizing: border- box;
  -moz-box-sizing: border- box;}

20) Which of the following is Not a valid 3D transform method?
a) Matrix3d ()
b) Scale3d ()
c) Translated 3d ()
d) Perspective3d ()

21) Which of the following statements is true abut z-index in CSS3?
a)z- index only affects text elements.
b)z- index only used for pseudo – class elements.
c)z-index only affects positioned elements.
d)z- index only affects absolute positioned elements.

22) Which of these values are not valid for background 0repeat property?
a)Repeat-x
b)Repeat-y
c)Repeat-xy
d)No repeat

23) What will be the output of the following code/
    <style>.foo  {
    Width :100px;
    Height: 50px;
    Border- width : 3px;
    -webkit- border- image:
    -webkit- gradient (linear, 00, 0 100,  from (black), to (red)) 1 100%;
    -webkit –border- image:
    -webkit – linear- gradient (black, red) 1 100%;
    -o- boder – image:
    -o-linear- gradient (black, red)) 1 100%;
    -moz-border-image:
    -moz-linear-gradient (black, red) 1  100%;
     }
    </style>
    <div class= “foo”> Loream</div>
a)The text “Loren” will be colored black-red.
b)The div element will be colored black-red.
c)The border of div element will be colored black- red.
d)None of these.

 24) Using the following code you will remove margin form. Float-wrapper?
a).float-wrapper {margin- bottom:0; }
b). float- wrapper {margin- bottom: none;  }
c).float- wrapper {margin- bottom: 1;  }
d).float- wrapper {margin- bottom: 5;  }

25) Which of the following are valid font descriptors? Check all that apply.
a)Unicode
b)Font-family
c)Cont-stretch
d)Font-style

26) What does the CSS3 style grid-column –start: 2; does?
a)Generates gird with 2 columns
b)Creates a grid item on second column
c)Starts grid item form second column
d)Creates a 2x2 gir

27) The ……………………. Property allows you to control the shape or style of bullet point in the case of unordered  lists items, and the style of numbering characters in ordered list items.
a)List-style-type
b)List-style-layout
c)List-type-style
d)List-type

28) Which of the given css code satisfies the following/
      Selects all Elements that are placed immediately after a element.
a)Div p
b)Div >p
c)Div + p
d)Div ~p

30) What does the background –origin property specifies?
a)Specifies the painting area of the background.
b)Specifies where the background image is positioned.
c)Allows you to specify the size of background images.
d)Allows you to add multiply background images for an element.

31) Following style is applied to –
    div. wrapper h2 {
    font -size : 18 px;
    margin-top : 0;
    }
a)Type 2 Heading inside Element div of class wrapper.
b)Type 2 Heading inside Element div with id wrapper.
c)Type 2 Heading inside Element div of any Class
d)None of these.

32) Using the following code you will empty- cells of table?
a)Empty-cells :  show  I  hide
b)Empty – cells : inherit I show I remove
c)Empty- cells : inherit I show I hide
d)Empty- cell : inherit I show I none

 33) How to select
       Which placed immediately after?
        ?
a)Div > P
b)Div + p
c)Div ~ P
d)P: after (div)

34) Which property can be used increase or decrease the space between words?
 a)Space
 b)Word- spacing
 c)Word-space
 d)Both 2 and 3

35) What are the Full- lengths Properties?
a)Border- top- width:    thin;
   Border- right-width:  small;
   Border-left- width:   medium;
b)Border- top- width:    thin;
  Border- right-width:  medium;
  Border- bottom-width:  thin
  Border-left- width:   medium;
c)Border- right-width:  medium;
  Border- bottom-width:  thin
  Border-left- width:   high;
d)Border- top- width:    thin;
  Border- right-height:  medium;
  Border- bottom-height thin
  Border-left- width:   medium;

36) Which of the following statements is correct of Floating Elements?
a)Floating an element allow you to take that element out of normal flow and positon it to the far left      or right of a containing box
b)The Floated element becomes a block-level element around which other content can flow
c)Floating an element allows you to add that element in of normal flow and position it to the far left      or  right of a containing Div
d)Floating and element in  relation to the browser window, as opposed to the containing element

37) Which of the following selector is used to specify a style for a single, unique element?
a)ID
b)Class
c)Text
d)Bit

38) Which of the following are valid media types for media query? Check all that apply.
a)All
b)Specters
c)Print
d)Screen

39) Which of the following is used to represent Visited hyperlink?
a): visited
b): clicked
c): focus
d): Link

40) The different ways to associate styles with a HTML document is/are
a)Embedded CSS with <style> element
b)Inline CSS with style attribute.
c)External CSS with <link> element.
d)All of the above