CSS important MCQs in English/Hindi | Nielit Notes | PDF

In this post, we cover all important Questions from the topic "CSS".

These MCQs will definitely help to pass IT and Computer students in any exam and interview that have CSS topic.

The CSS chapter covers the following topics:

1. Introduction to CSS, Types of CSS.

2. CSS Selectors : Universal Selector ,ID selector, Tag Selector, Class Selector, Sub        Selector, Attribute Selector, Group Selector.

3. CSS Properties : Back Ground properties , Block Properties , Box properties , List      properties , Border Properties , Positioning Properties.

4. CSS Lists, CSS Tables, CSS Menu Design CSS Image Gallery.

After completion of the Cascading Style Sheets (CSS) unit, Students are expected to be clear about the following things:

  • Purpose of CSS.
  • Role of CSS in web sites.
  • Enhancing the effects in website.


CSS MCQs

Here are the 50 most important and frequently asked MCQs from the  "CSS" topic.



1. CSS stands for 
a) Cascade style sheets
b) Color and style sheets
c) Cascading style sheets
d) None of the above
Correct Answer. c) Cascading style sheets


2. Which of the following selector matches an element based on its id?
a) The universal selector 
b) The descendant selector
c) The class selector 
d) The id selector
Correct Answer.d) The id selector


3. How to select the elements with the class name "example"?
a) example
b) #example
c) .example
d) Class example
Correct Answer. c) .example



4. _________ CSS property that can be used for collapsing the borders between
table cells. 
a) bordercollapse
b) backgroundattachment
c) Display 
d) float-left 
Correct Answer.a) bordercollapse


5. CSS is a_________ language
a) Structural
b) Presentational
c) Markup
d) Behavioral 
Correct Answer.b) Presentational


6. You can write the CSS code once and then you can reuse same sheet in
multiple HTML pages.
a) True
b) False
Correct Answer.a) True


7. Which of the following syntax is correct in CSS to make each word of a sentence start with a capital letter?
a) text-style : capital;
b) transform : capitalize;
c) text-transform : capital;
d) text-transform : capitalize;
Correct Answer.d)


8. Which CSS property is used for controlling the layout.
a) CSS 
b) backgroundattachment
c) margin 
d) Display
Correct Answer.d) Display


9. Name a syntax of declaring a CSS rule is:
a) property-name = value;
b) property-name : value
c) property-name = value
d) property-name:value
Correct Answer.d) property-name:value


10. __________ property influences the horizontal alignment of an element,
making it “float” toward the left or right margin of its containing element.
a) Float-align
b) list-styleimage
c) bordercollapse
d) float-left 
Correct Answer.a) Float-align


11. The box model applies to the spa elements.
a) True
b) False
Correct Answer.b) False


12. Which if the following CSS function allows us to perform calculations?
a) calc() function
b) calculator() function
c) calculate() function
d) cal() function
Correct Answer. a) calc() function


13. Which tag is used to link an external style sheet to a webpage?
a) Link tag
b) Style tag
c) Script tag
d) @media
Correct Answer.a) Link tag


14. You can used absolute lengths to specify the height and width of an element.
a) True
b) False
Correct Answer.b) False


15. If the element has position as __________ that will place the element depend
upon its nearest parents elements.
a) Absolute
b) class
c) Float-align 
d) list-styleimage
Correct Answer.a) Absolute


16. Which symbol indicates class selector in CSS.
a) Hash
b) Plus
c) Dot
d) None
Correct Answer.c) Dot


17. Relative positioning removes element from the general flow of elements on
the page.
a) True
b) False
Correct Answer.b) False


18. __________ property assigns a graphic image to a list item.
a) backgroundattachment
b) margin 
c) list-styleimage
d) Display 
Correct Answer.c) list-styleimage


19. The property in CSS used to change the background color of an element is -
a) bgcolor
b) color
c) background-color
d) All of the above
Correct Answer. c) background-color


20. To select tag by their id attribute
a) Class selector
b) ID selector
c) Tag selector
d) Sibling selector 
Correct Answer.b) ID selector


21. The CSS property used to specify whether the text is written in the horizontal or vertical direction?
a) writing-mode
b) text-indent
c) word-break
d) None of the above
Correct Answer.a) writing-mode


22. __________ has introduced text, list, box, margin, border, color and background
properties.
a) Display 
b) float-left
c) CSS
d) Web
Correct Answer.c) CSS


23. Which of the following selector selects the element that is targeted in the
URL?
a) :selected
b) :link 
c) :target
d) :enabled 
Correct Answer.c) :target


24. Which property is used in CSS to change the background color?
a) bgcolor 
b) background-color
c) color 
d) back-color
Correct Answer.b) background-color


25. <a href=mailto:sales124@gmail.com> is the correct e-mail link.
a) True
b) False
Correct Answer.a) True


26. The property in CSS used to change the text color of an element is 
a) bgcolor
b) color
c) background-color
d) All of the above
Correct Answer.b) color


27. What this code will happen:
<p style=”color:blue”>text</p>
a) To make the specific paragraph blue
b) Error
c) nothing happen
d) None of the above
Correct Answer.a)


28. Which of the following property is used as the shorthand property for the padding properties?
a) padding-left
b) padding-right
c) padding
d) All of the above
Correct Answer. c) padding


29. By default, hyperlinks are displayed with an underline.__________ you remove
the underline from all hyperlinks by using CSS code .
a) Float-align
b) a {textdecoration:none;}
c) list-styleimage
d) bordercollapse
Correct Answer. b) a {textdecoration:none;}


30. Specifying an element’s position as absolute remove it from the normal flow
of elements on the page.
a) True
b) False
Correct Answer.a) True


31. If we do not want to allow a floating div to the left side of an element,
which css property will you use?
a) Margin 
b) Clear
c) Float 
d) Padding
Correct Answer.b) Clear


32. ___________ property sets a consistent margin on all four sides of the affected
elements.
a) class
b) Float-align 
c) margin
d) list-styleimage
Correct Answer.c) margin


33. The HTML attribute used to define the internal stylesheet is -
a) <style>
b) style
c) <link>
d) <script>
Correct Answer.a) <style>

 
34. The link element should be placed at the top of the body section.
a) True
b) False
Correct Answer.b) False


35. The CSS property used to control the element's font-size is -
a) text-style
b) text-size
c) font-size
d) None of the above
Correct Answer. c) font-size


36. Which selector is being used to specify a group of elements
a) Name 
b) ID
c) Class 
d) Tag
Correct Answer.c) Class


37. The__________ attribute is used to define the name (s) of the class (es) to which
particular tag belongs.
a) bordercollapse
b) Display 
c) float-left 
d) class
Correct Answer.d) class


38. Linking to an external style sheet allows you to have hyperlinks from your
page to the World Wide Web)
a) True
b) False
Correct Answer.b) False


39. Which of the following selector selects the element that is the first child of
its parents that is its type?
a) :first-of-type 
b) :last-child
c) ::first-line 
d) ::first-letter
Correct Answer.a):first-of-type


40. Bo-sizing allows you to include the padding and border in element total
width and height.
a) True
b) False
Correct Answer.a) True


41. If we want to show an Arrow as cursor, then which value we will use ?
a)pointer
b)default
c)arrow
d)arr
Correct Answer. b)default


42. Which of the following properties will use to display border around cell
without any content?
a) Empty-cell 
b) Blank-cell
c) Noncontent-cell 
d) no-cell
Correct Answer.a) Empty-cell


43. The HTML attribute used to define the inline styles is -
a) style
b) styles
c) class
d) None of the above
Correct Answer. a) style


44. Which of the following CSS list properties is/are correct?
a) set different list item markers for ordered list
b) set different list item markers for unordered list
c) set an image as the list item marker
d) All of the mentioned
Correct Answer.d)


45. If we want to define a style for a unique element, then which CSS selector will we use?
a)Id
b)text
c)class
d)name
Correct Answer. a)Id


46. __________ property that is used for controlling image-scroll.
a) backgroundattachment
b) Absolute 
c) class
d) Float-align 
Correct Answer.a) backgroundattachment


47. Inline element has no line break and you cannot set height and width of the
element.
a) True
b) False
Correct Answer.a) True


48. Styles that are placed within style tag are called as:
a) External styles
b) Inline styles 
c) Embedded styles
d) Html styles 
Correct Answer.c) Embedded styles


49. Which of the following CSS property is used to represent the overflowed text which is not visible to the user?

a) text-shadow
b) text-stroke
c) text-overflow
d) text-decoration
Correct Answer. c) text-overflow


50. The CSS property used to set the maximum height of the element's content box is
a) max-width propertyu exam formm
b) height property
c) max-height property
c) position property
Correct Answer. c) max-height property

No comments:

Powered by Blogger.