Others




CSS MCQ (Mulitple Choice Questions and Answers)


  1. CSS stands for

    1. Common style sheet

    2. Config style sheets

    3. Cascading style sheets

  2. Which of the following is the correct syntax for inline style?

    1. <h1 style:'color=red'>Sample</h1>

    2. <h1 style='color:red'>Sample</h1>

    3. <h1 'style=color:red'>Sample</h1>

  3. Which of the following is the correct syntax for add an external style sheet?

    1. <style href='main.css'></style>

    2. <style src='main.css'></style>

    3. <link  rel='stylesheet' type="text/css" src='main.css'>

    4. <link rel='stylesheet' type="text/css" href='main.css'>

  4. Which of the following property is used to set the background color of an element

    1. background-rgb

    2. background-color

    3. background-rgba

    4. None of the above

  5. Which Tag used to define an internal style?

    1. <style>

    2. <link>

    3. <script>

  6. Which extension is used to save a css file?

    1. .cs

    2. .style

    3. .css

    4. .design

  7. Which selector is used to select multiple elements in css?

    1. Class selector

    2. Attribute Selector

    3. Element Selector

    4. all of the above

  8. Which selector is used to add style for an unique element in css?

    1. Class selector

    2. ID Selector

    3. Element Selector

    4. None of the above

  9. Which property is used to set the text color?

    1. color

    2. text-color

    3. color-text

    4. font-color

  10. Which of the following is used to color value in CSS?

    1. Hexadecimal Value

    2. rgb()

    3. color name

    4. all of the above

  11. Which of the following is used to set the subscript of text using CSS?

    1. hrizontal-align:sub

    2. vertical-align:sub

    3. hrizontal-align:subscript

    4. vertical-align:subscript

  12. Which of the following is the correct syntax to select all span elements in a div element?

    1. span

    2. div span

    3. div+span

    4. div::span

  13. Which of the following CSS property is used to add underline to the text?

    1. text-decoration

    2. text-transform

    3. text-indent

  14. Which property is used to specify the transparency of an element

    1. overflow

    2. float

    3. clear

    4. opacity

  15. The correct syntax to set a double border

    1. border-style:double;

    2. border-width:double;

    3. border-format:double;

    4. None of the Above

  16. The correct syntax to set a bold text

    1. font-weight:bold;

    2. font-weight:600;

    3. font-weight:900;

    4. All of the Above

  17. Which attribute is used for Inline styles

    1. css

    2. style

    3. src

    4. inline

  18. Who invented CSS?

    1. Hakon Wium Lie

    2. Sergey Brin

    3. Rasmus Lerdorf

    4. Brendan Eich

  19. Which of the following tag is used to embed css in html page?

    1. <css>

    2. <!DOCTYPE html>

    3. <script>

    4. <style>

  20. In CSS, what does h1 can be called as

    1. Attribute

    2. Selector

    3. Tag

    4. Value

  21. Which of the following CSS framework is used to create a responsive design?

    1. django

    2. rails

    3. larawell

    4. bootstrap

  22. Which of the following are the CSS Extension Prefixes for Webkit?

    1. -chrome

    2. -web

    3. -o-

    4. -webkit

  23. Which of the following is not a value for the font-style property?

    1. oblique

    2. normal

    3. italic

    4. none of the above

  24. Which of the following function defines a linear gradient as a CSS image?

    1. gradient()

    2. linear-gradient()

    3. grayscale()

    4. image()

  25. Which of the following is the correct way to apply CSS Styles?

    1. in an external CSS file

    2. inside an HTML element

    3. inside the <head> section of an HTML page

    4. all of the above

  26. Which is not the property of the CSS box model?

    1. margin

    2. color

    3. width

    4. height

  27. Which of the following CSS property sets the amount of spacing between letters?

    1. line-height

    2. letter-space

    3. space

    4. letter-spacing

  28. Which of the following CSS property sets what kind of line decorations are added to an element, such as underlines, overlines, etc?

    1. text-decoration

    2. text-style

    3. decoration-line

    4. text-line

  29. Which of the following CSS property adds padding to the top of an element?

    1. padding-top

    2. padding-height

    3. top

    4. padding-left

  30. Which of the following CSS property sets the shadow for a box element?

    1. set-shadow

    2. box-shadow

    3. shadow

    4. canvas-shadow

  31. Which of the following CSS Property controls how an element is positioned?

    1. static

    2. position

    3. fix

    4. set

  32. What is the CSS property equivalent for the attribute <center>?

    1. color

    2. margin

    3. align

    4. none

  33. Which of the following property is used to align the text in a table?

    1. text-align

    2. align

    3. text

    4. none of the above

  34. Which of the following CSS property sets the opacity level for an element?

    1. transparent

    2. opacity

    3. transparency

    4. all of the above

  35. Which of the following CSS property defines the space between cells in a table?

    1. border-spacing

    2. border-style

    3. border

    4. none of the bove

  36. Which of the following property is used as the shorthand property of margin properties?

    1. margin-left

    2. marign

    3. margin-right

    4. none of the above

  37. Which of the following property defines the color for the bottom border of an element?

    1. border-right-color   

    2. border-color-right

    3. border-color

    4. border-right

  38. Which symbol is used to defined id selector?

    1. * (astrik)   

    2. . (dot)   

    3. ^ (exponent)

    4. # (hash)

  39. Which of the following values specifies the dotted border?   

    1.  border-style:dot

    2. border-style:dotted

    3. border-dot

    4. None of the above

  40. From the given which one is correct?

    1. font-thick:bold;

    2. font:bold;   

    3. font-weight:bold;

    4. font-weight:thin;

  41. How you give solid value by using css property?   

    1. border-style

    2. border-solid

    3. border-thick

    4. border-thin

  42. Which of the following property controls the vertical overflow of a block or inline block?   

    1. overflow-y

    2. overflow-x

    3. overflow

    4. overflow-none

  43. Which of the following is not an appropriate value for overflow element?

    1. hidden

    2. auto

    3. scroll

    4. fixed

  44. Which of the following property converts text to initial capitals, all uppercase, or all lowercase?   

    1. text-transform

    2. text

    3. text-decoration

    4. text-uppercase

  45. Which of the following is  a value for font-style property?   

    1. size

    2. italic

    3. bold

    4. none of the above

  46. Which of the following Property controls the display of small caps?   

    1. font-size

    2. font-variant

    3. font-style   

    4. font-weight

  47. Which css property you will use margin between a DIV's border and its inner text ?   

    1. Spacing

    2. Space

    3. inner-margin

    4. Padding

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

    1. wrap

    2. push

    3. float

    4. align

  49. How do you make a list that lists its items with squares?

    1. list-type: square

    2. type: square

    3. type: 2

    4. list-style-type: square

  50. How do you make each word in a text start with a capital letter?   

    1. text-transform:capitalize

    2. text-transform:uppercase

    3. none of the above