Online Shiksha

By Savita S. More

MCQ on Introduction to CSS

MCQ on Introduction to CSS – Test your knowledge with these multiple-choice questions covering the fundamentals of CSS, including selectors, properties, and styling techniques. Perfect for reviewing your understanding of CSS basics!”

 

What is the primary purpose of CSS in web development?

  1. A) To structure web content
  2. B) To enhance the visual presentation of web pages
  3. C) To define interactive elements
  4. D) To handle server-side operations

Answer: B) To enhance the visual presentation of web pages

 

Which type of CSS is primarily used when styling multiple web pages with consistent design?

  1. A) External CSS
  2. B) Internal CSS
  3. C) Inline CSS
  4. D) Embedded CSS

Answer: A) External CSS

 

What property in CSS is used to change the color of text?

  1. A) text-color
  2. B) font-color
  3. C) color
  4. D) text-style

Answer: C) color

 

Which property can be used to set the spacing between letters in text?

  1. A) letter-spacing
  2. B) word-spacing
  3. C) text-spacing
  4. D) character-spacing

Answer: A) letter-spacing

 

What property is used to set the alignment of text within an HTML element?

  1. A) text-align
  2. B) align-text
  3. C) text-justify
  4. D) align-content

Answer: A) text-align

 

Which property is used to specify the space between two lines of text?

  1. A) line-spacing
  2. B) text-spacing
  3. C) line-height
  4. D) text-height

Answer: C) line-height

 

How can you add a background image to a webpage using CSS?

  1. A) Using the background-image property
  2. B) Using the image-background property
  3. C) Using the background property
  4. D) Using the image property

Answer: A) Using the background-image property

 

What property is used to set the width of an image border?

  1. A) border-size
  2. B) image-border-width
  3. C) border-width
  4. D) image-width

Answer: C) border-width

 

Which CSS property is used to control the transparency of an image?

  1. A) transparency
  2. B) opacity
  3. C) visibility
  4. D) clear

Answer: B) opacity

 

What is the primary advantage of using External CSS over Inline CSS?

  1. A) Faster loading time
  2. B) Easier maintenance
  3. C) Greater specificity
  4. D) Simpler implementation

Answer: B) Easier maintenance

 

Which CSS property can be used to specify the style of a border?

  1. A) border-style
  2. B) border-design
  3. C) border-type
  4. D) border-format

Answer: A) border-style

 

What does the line-height property in CSS determine?

  1. A) The thickness of a border
  2. B) The space between two letters
  3. C) The space between two lines of text
  4. D) The size of the font

Answer: C) The space between two lines of text

 

How can you align text within a table cell vertically?

  1. A) Using the text-align property
  2. B) Using the align-property
  3. C) Using the vertical-align property
  4. D) Using the align-text property

Answer: C) Using the vertical-align property

 

Which CSS property is used to collapse table borders into a single border?

  1. A) border-collapse
  2. B) table-border
  3. C) border-combine
  4. D) border-merge

Answer: A) border-collapse

 

Which property is used to set the width of a border in CSS?

  1. A) border-size
  2. B) border-width
  3. C) border-thickness
  4. D) border-length

Answer: B) border-width

 

How can you add a background color to a webpage using CSS?

  1. A) Using the background-color property
  2. B) Using the color property
  3. C) Using the background property
  4. D) Using the page-color property

Answer: A) Using the background-color property

 

Which CSS property is used to define the font family of text?

  1. A) font-family
  2. B) text-family
  3. C) font-style
  4. D) text-font

Answer: A) font-family

 

What does the opacity property in CSS determine?

  1. A) The clarity of text
  2. B) The size of an element
  3. C) The transparency of an element
  4. D) The color saturation of an element

Answer: C) The transparency of an element

 

Which type of CSS is written within the HTML file itself?

  1. A) External CSS
  2. B) Internal CSS
  3. C) Inline CSS
  4. D) Embedded CSS

Answer: B) Internal CSS

 

What does the letter-spacing property in CSS determine?

  1. A) The space between two words
  2. B) The space between two lines of text
  3. C) The space between two letters
  4. D) The size of the font

Answer: C) The space between two letters

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

online-shiksha © 2023 Frontier Theme
Online Shiksha