NEW
Font size
WorksheetsIntroduction to CSS Basics
Total questions: 10
Worksheet time: 10mins
What is the primary purpose of CSS in web development?
To structure the content of a webpage
To style and present the content of a webpage
To store data on a server
To manage user interactions
When was the first CSS specification released?
1994
1996
1998
2000
Which version of CSS introduced modularization?
CSS 1
CSS 2
CSS 3
CSS 4
What is a disadvantage of using inline styles in HTML?
They are easy to maintain
They violate the separation of concerns principle
They reduce the number of HTTP requests
They are the most specific way to style an element
Which method of adding CSS is most efficient for managing styles across multiple web pages?
Inline styles
Internal style sheets
External style sheets
Imported style sheets
What is the main benefit of using external style sheets?
They increase the size of HTML documents
They allow styles to be cached by the browser
They are buried in the HTML file
They are specific to individual elements
Which CSS version is still under development and not fully supported by all browsers?
CSS 1
CSS 2
CSS 3
CSS 4
How are styles added in an internal style sheet?
Using the style attribute in HTML elements
Using the style element in the head section of an HTML document
Using a separate CSS file linked to the HTML document
Using the @import rule
What is the purpose of the @import rule in CSS?
To apply styles to a single HTML element
To import styles from another CSS file
To define inline styles
To link an external style sheet
Which of the following is the correct way to link an external CSS file in an HTML document?
<style src="main.css"></style>
<link rel="stylesheet" type="text/css" href="main.css">
<script src="main.css"></script>
<import url="main.css">
