CSS MCQ Questions

CSS MCQ Questions

  • Sharad Jaiswal
  • 23rd Nov, 2021

Practice best CSS MCQ Questions, which cover the latest and important topics of CSS (Cascading Style Sheets), so you can perform best in CSS MCQ Interviews, Competitive Exams, and Placement drives. this CSS MCQ Quiz contains 40+ CSS Multiple Choice Questions, which are asked various times in exams or interviews. when you choose an option for these questions, the green color belongs to the right option & the red color belongs to the wrong option.

Practice Best CSS MCQ Questions

1) In css what does h1 can be called as

  • A. Selector
  • B.Attribute
  • C.Value
  • D.Tag

2) Which of the following attributes is used to specify elements to bind style rules to?

  • A. id
  • B.class
  • C.tag
  • D.all of the mentioned

3) _______selectors, which are used to specify a group of elements

  • A. id
  • B.class
  • C.tag
  • D.both (B) and (C)

4) __________implementation that introduced text, list, box, margin, border, color, background properties.

  • A. css
  • B.html
  • C.ajax
  • D.php

5) Which Is The Correct CSS Syntax?

  • A. Body:color=black
  • B.{body;color:black}
  • C.{body:color=black(body}
  • D.Body {color: Black}

6) Which of the following function define a linear gradient as a css image?

  • A. linear- gradient()
  • B.image()
  • C.gradient()
  • D.grayscale()

7) Which of the following is not a value for font-style property?

  • A. normal
  • B.italic
  • C.oblique
  • D.None of the above

8) Which of the following selects a normal, or small-caps face from a font family?

  • A. font-weight
  • B.font-synthesis
  • C.font-kerning
  • D.font-variant

9) If we want to wrap a block of text around an image, which css property will we use ?

  • A. wrap
  • B.push
  • C.float
  • D.align

10) Which of the following properties will we use to display border around a cell without any content ?

  • A. blank-cell
  • B.void-cell
  • C.empty-cell
  • D.noncontent-cell

11) If we want to show an Arrow as cursor, then which value we will use ?

  • A. pointer
  • B.arrow
  • C.arr
  • D.default

12) How can we write comment along with CSS code ?

  • A. // a comment //
  • B./* a comment */
  • C./ a comment /
  • D.<' a comment'>

13) which property is used to control text size of an element in css?

  • A. font-size
  • B.font-style
  • C.text-size
  • D.text-style

14) Which css property you will use if you want to add some margin between a DIV's border and its inner text ?

  • A. spacing
  • B.inner-margin
  • C.margin
  • D.padding

15) The default value of "position" attribute is _________.

  • A. relative
  • B.inherit
  • C.absolute
  • D.fixed

16) How will you make all paragraph elements 'RED' in color ?

  • A. p {color: red;}
  • B.all.p {color: #998877;}
  • C.p.all {color: #990000;}
  • D.p.all {color: red;}

17) Which of the following is the correct way to apply Styles?

  • A. inside an HTML element
  • B.in an external CSS file
  • C.inside the section of an HTML page
  • D.all of the mentioned

18) The __________ property specifies the type of positioning method used for an element.

  • A. position
  • B.padding
  • C.align
  • D.float

19) Which of the following CSS list properties is/are correct?

  • A. Set an image as the list item marker
  • B.Set different list item markers for unordered lists
  • C.Set different list item markers for ordered lists
  • D.All of the mentioned

20) Suppose we want to arragnge five nos. of DIVs so that DIV4 is placed above DIV1. Now, which css property will we use to control the order of stack?

  • A. z-index
  • B.x-index
  • C.s-index
  • D.d-index

21) Which Of The Following Selector Selects An Element If It's The Only Child Of Its Parent?

  • A. :nth-oftype(n)
  • B.:root
  • C.:only-child
  • D.None Of The Mentioned

22) What Should Be The Table Width, So That The Width Of A Table Adjust To The Current Width Of The Browser Window?

  • A. 1024 Px
  • B.Full-screen
  • C.100.00%
  • D.640 Pixels

23) Which CSS Property Sets A Background Image For An Element?

  • A. Background - Color
  • B.Background - Attachment
  • C.Background - Image
  • D.linear-gradient

24) Which Event Will Be Used When A Connection To The Server Is Opened.

  • A. Onopen
  • B.Onerror
  • C.Onmessage
  • D.None Of The Above

25) What Is CSS Stand For

  • A. Cascade Style Sheet
  • B.Cascading Style Sheets
  • C.Cascade Sheets Style
  • D.Color Style Sheets

26) What is the correct HTML for referring to an external style sheet?

  • A. <stylesheet="cssfile" href="stylesheet">
  • B.<link rel="stylesheet" type="text.css" href="mystyle.css">
  • C.<style src="mystyle.css">
  • D.<stylesheet>mystyle.css

27) Where in an HTML document is the correct place to refer to an external style sheet?

  • A. at the end of document
  • B.in the <head> section
  • C.in the <body> section
  • D.at the end of html section

28) Which HTML tag is used to define an internal style sheet?

  • A. <css>
  • B.<style>
  • C.<script>
  • D.<html>

29) Which property is used to change the left margin of an element?

  • A. float
  • B.padding-left
  • C.indent
  • D.margin-left

30) Which CSS property is used for controlling the layout?

  • A. Header
  • B.Footer
  • C.Display
  • D.None of the above

31) Pseudo-classes in CSS...............

  • A. Select The Active Links
  • B.Match A Specified Element
  • C.Are Used To Select All The Visited Links
  • D.Are Used To Define A Special State Of An Element

32) What should be the table width so that the width of a table adjust to the current width of the browser window?

  • A. 640 Pixels
  • B.100.00%
  • C.Full-screen
  • D.1024 Pixels

33) The default value of "position" attribute is...........

  • A. Static
  • B.Fixed
  • C.Inherit
  • D.Absolute

34) When we write , what "img.png" inside double quote implies?

  • A. Value
  • B.Element
  • C.Operator
  • D.Attribute

35) Which of the following property is used as the shorthand property of margin properties?

  • A. Margin-left
  • B.Margin-right
  • C.Margin
  • D.None of the above

36) How to select the elements with the class name "example"?

  • A. example
  • B..example
  • C.#example
  • D.Class example

37) Which of the following method rotates an element around its Y-axis at the given degree using transform 3D?

  • A. rotateY()
  • B.rotate-Y()
  • C.rotate-Yaxis()
  • D.None of the above

38) Which of the following CSS3 property specifies how nested element are rendared in 3D space?

  • A. Transform
  • B.Transform-style
  • C.Transform-render
  • D.None of the above

39) Which of the following is not a type of combinator?

  • A. >
  • B.~
  • C.+
  • D.*

40) What tag will let you bind an external .css file to a parent .html file?

  • A. CSS
  • B.Link
  • C.Style
  • D.None of the above

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Jun
Devops mcq
01st
Nov
Oracle MCQ
01st
Nov
React Js MCQ