NEW
Font size
WorksheetsHTML and CSS Quiz
Total questions: 20
Worksheet time: 10mins
What is the purpose of the <p> tag in HTML?
is used to define images
is used to define paragraphs
is used to define headings
is used to define lists
What does the color property in CSS specify?
color property is used to set the background color of an element
color property is used to set the text color of an element
color property is used to set the border color of an element
color property is used to set the size of an element
What is the purpose of <h1> to <h6> tags in HTML?
to are used for creating hyperlinks
to are used for creating lists
to are used for creating headings
to are used for creating tables
What does CSS stand for?
CSS stands for Cascading Style System
CSS stands for Cascading Style Sheets
CSS stands for Computer Style Sheets
CSS stands for Creative Style Syntax
What does the margin property in CSS define?
margin defines the space inside an element
margin defines the space outside an element
margin is used to set the border of an element
margin is used to set the font style of an element
What is the purpose of the <div> tag in HTML?
The tag is used to create hyperlinks
The tag is used to group block-level elements
The tag is used to display inline elements
The tag is used to define styles
Where is inline CSS written?
Inline CSS is written inside tags
Inline CSS is written inside the section
Inline CSS is written directly in the HTML tag
Inline CSS is written in a separate file
What does the padding property in CSS adjust?
The padding property adjusts the space between elements
The padding property adjusts the space inside an element
The padding property adjusts the space outside an element
The padding property adjusts the size of text
What is the purpose of the <a> tag in HTML?
The tag is used to create images
The tag is used to create tables
The tag is used to create hyperlinks
The tag is used to create lists
How is the id selector defined in CSS?
The id selector is defined using a period (.)
The id selector is defined using a hashtag (#)
The id selector is defined using a slash (/)
The id selector is defined using an asterisk (*)
What is the purpose of the <ul> tag in HTML?
The tag creates an ordered list
The tag creates an unordered list
The tag creates a description list
The tag creates a table
What is the default position of an HTML element?
absolute
relative
static
fixed
Which attributes are required for the<img> tag?
src only
Both src and alt
href only
name only
What is the purpose of the z-index property in CSS?
To set text color
To stack elements
To define font size
To define padding
What does the <br> tag do in HTML?
Creates a horizontal line
Creates a line break
Creates bold text
Creates a blockquote
Where is external CSS written?
Inside the HTML file
In a separate .css file
Inside tags
Directly in the HTML tag
What type of border does border: 1px solid red; create?
A dashed red border
A solid red border
A dotted red border
A double red border
What is the purpose of the <link> tag in HTML?
To link JavaScript files
To link CSS files
To link images
To link audio files
What does the <title> tag define?
The main heading of the page
The title shown in the browser tab
The content of the page
The metadata of the page
What does the font-size property in CSS define?
The font family
The text size
The text alignment
The text decoration
