KEMBAR78
01 - CSS Questionnaire | PDF | World Wide Web | Internet & Web
0% found this document useful (0 votes)
19 views6 pages

01 - CSS Questionnaire

The document is an exam on Cascading Style Sheets (CSS) consisting of multiple-choice questions that test knowledge on CSS syntax, properties, and methods of application. It covers topics such as the purpose of CSS, different types of styles (inline, internal, external), and various CSS properties for styling HTML elements. The exam aims to assess understanding of CSS fundamentals and best practices in web development.

Uploaded by

maryjoygrcia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

01 - CSS Questionnaire

The document is an exam on Cascading Style Sheets (CSS) consisting of multiple-choice questions that test knowledge on CSS syntax, properties, and methods of application. It covers topics such as the purpose of CSS, different types of styles (inline, internal, external), and various CSS properties for styling HTML elements. The exam aims to assess understanding of CSS fundamentals and best practices in web development.

Uploaded by

maryjoygrcia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

BTLED ICT 18&19

CASCADING STYLE SHEETS EXAM

Direction: Choose the letter that corresponds to the best/correct answer.

1. Which of the following best describes CSS?


a. A programming language used to build websites
b. A markup language used to structure web pages
c. A styling language used to change the appearance of web pages
d. A database language used to store and retrieve data

2. What is the purpose of CSS in web development?


a. To create dynamic web pages
b. To add interactivity to web pages
c. To separate the presentation of a web page from its content
d. To enhance the security of web pages

3. Which of the following is not a benefit of using CSS in web development?


a. Faster page loading times
b. Improved accessibility for users with disabilities
c. Greater flexibility and control over design
d. Enhanced search engine optimization (SEO)

4. Which of the following is the correct syntax for defining a CSS rule?
a. selector { property: value; }
b. value { property: selector; }
c. property { value: selector; }
d. selector: value { property; }

5. Which of the following is an example of an inline CSS style?


a. <head><style>p { color: red; }</style></head>
b. <style>p { color: blue; }</style><p style="color: red;">Hello</p>
c. <link rel="stylesheet" href="style.css">
d. <p class="highlight">Hello</p>

6. Which of the following is not a way to add CSS to an HTML document?


a. Using inline styles
b. Using external stylesheets
c. Using embedded stylesheets
d. Using JavaScript code

7. What is the advantage of using external stylesheets over inline styles?


a. External stylesheets allow for more precise targeting of HTML elements.
b. Inline styles are faster to load than external stylesheets.
c. External stylesheets can be reused across multiple web pages.
d. Inline styles offer more flexibility and customization options.

8. Which of the following is the correct syntax for linking an external stylesheet to an
HTML document?
a. <link href="style.css" rel="stylesheet" type="text/html">
b. <link rel="stylesheet" href="style.css">
c. <style src="style.css" type="text/css"></style>
d. <link type="text/css" rel="stylesheet" href="style.css">

9. Which of the following is the correct syntax for a CSS comment?


a. // This is a comment
b. /* This is a comment */
c. <!-- This is a comment -->
d. # This is a comment

10. Which of the following is the correct syntax for applying a CSS style to multiple
selectors?
a. selector1, selector2 { property: value; }
b. selector1 & selector2 { property: value; }
c. selector1 + selector2 { property: value; }
d. selector1 > selector2 { property: value; }

11. Which of the following is the correct syntax for using CSS shorthand to set the font
properties?
a. font: size family style;
b. font: style size family;
c. font: family size style;
d. font: family style size;

12. Which of the following is the correct syntax for applying a background color to an
HTML element?
a. color: red;
b. bg-color: red;
c. background-color: red;
d. background: red;

13. Which of the following is the correct syntax for using an ID selector in CSS?
a. .my-class {}
b. #my-id {}
c. my-id {}
d. my-class {}

14. Which of the following is the correct syntax for using a class selector in CSS?
a. .my-class {}
b. #my-id {}
c. my-id {}
d. my-class {}

15. Which of the following is the correct syntax for using a descendant selector in CSS?
a. selector1 > selector2 {}
b. selector1 + selector2 {}
c. selector1 ~ selector2 {}
d. selector1 selector2 {}

16. Which of the following CSS properties is used to set the font size?
a. font-family
b. font-weight
c. font-size
d. font-style

17. Which of the following CSS properties is used to set the text color?
a. background-color
b. color
c. text-color
d. font-color

18. Which of the following CSS properties is used to set the width of an HTML element?
a. height
b. width
c. size
d. length

19. Which of the following CSS properties is used to center an HTML element
horizontally?
a. text-align
b. vertical-align
c. margin-left
d. margin-right

20. Which of the following CSS properties is used to control the visibility of an HTML
element?
a) visibility
b) display
c) opacity
d) overflow
21. Which of the following CSS properties is used to position an HTML element relative to
its normal position?
a. position
b. top
c. left
d. float

22. Which of the following CSS properties is used to set the distance between adjacent
HTML elements?
a. margin
b. padding
c. border
d. spacing

23. Which of the following CSS properties is used to create columns in an HTML layout,
except?
a. column-count
b. column-gap
c. column-width
d. column-padding

24. Which of the following CSS properties is used to align an HTML element vertically
within its container?
a. vertical-align
b. text-align
c. align-items
d. justify-content

25. Which of the following is NOT a valid method for adding CSS to an HTML document?
a. Inline
b. Internal
c. External
d. Local
PART 2

1. What does CSS stand for?


a. Cascading Style Sheets
b. Computer Style System
c. Creative Styling Solutions
d. Colorful Style Selector

2. What is the purpose of CSS?


a. To provide structure to HTML documents
b. To add interactivity to HTML documents
c. To describe the presentation of HTML documents
d. To add functionality to HTML documents

3. What is the basic syntax of a CSS rule?


a. selector { property: value; }
b. property: value { selector; }
c. value: property { selector; }
d. selector: value { property; }

4. Which of the following is an example of a CSS selector?


a. p
b. font-size
c. red
d. #header

5. Which of the following is a way to add CSS to an HTML element, except?


a. Inline style
b. Internal style
c. External style
d. online style

6. What is inline style?


a. CSS code placed in a separate file
b. CSS code placed in the head section of an HTML document
c. CSS code applied directly to an HTML element
d. None of the above

7. What is internal style?


a. CSS code placed in a separate file
b. CSS code placed in the head section of an HTML document
c. CSS code applied directly to an HTML element
d. None of the above
8. What is external style?
a. CSS code placed in a separate file
b. CSS code placed in the head section of an HTML document
c. CSS code applied directly to an HTML element
d. None of the above

9. Which of the following is a CSS comment?


a. /* This is a CSS comment */
b. < !-- This is a CSS comment -->
c. // This is a CSS comment
d. # This is a CSS comment

10. Which of the following is a CSS property?


a. font-size
b. div
c. <h1>
d. background-color

11. Which of the following is a CSS value?


a. p
b. 14px
c. margin
d. #header

12. Which of the following is NOT a CSS selector?


a) Type selector
b) ID selector
c) Class selector
d) Size selector

13. Which of the following selectors is used to select all paragraph elements in an HTML
document?
a. p
b. .p
c. #p
d. *p

14. Which of the following properties is used to set the background color of an element?
a. font-size
b. margin
c. padding
d. background-color

15. Which of the following properties is used to set the font size of an element?
a. font-color
b. font-size
c. background-color
d. padding

16. Which of the following properties is used to set the margin around an element?
a. font-size
b. margin
c. padding
d. background-color

17. Which of the following properties is used to set the width of an element?
a. height
b. margin
c. padding
d. width

18. Which CSS property can be used to create a shadow effect behind an element?
a. shadow-color
b. box-shadow
c. text-shadow
d. border-shadow

19. Which CSS property can be used to change the color of text within an element on
hover?
a. text-color
b. color-on-hover
c. hover-color
d. color
20. Which CSS property can be used to create a horizontal line between sections on a
webpage?
a. border
b. margin
c. padding
d. border-bottom

21. Which CSS property is used to specify the order in which flex items are displayed in a
flex container?
a. align-items
b. order
c. flex-direction
d. justify-content

22. Which of the following CSS layout models is based on a grid system?
a. Flexbox
b. Floats
c. CSS Grid
d. Positioning

23. Which CSS property can be used to create a gradient background color?
a. background-image
b. background-color
c. gradient-color
d. background-gradient

24. Which of the following properties is used to set the display type of an element?
a. display
b. visibility
c. position
d. float

25. Which of the following is the most efficient method for adding CSS to an HTML
document?
a. Inline
b. Internal
c. External
d. It depends on the specific use case

You might also like