WorksheetsHTML CSS Quiz FOR CLASS 10TH
Total questions: 52
Worksheet time: 30mins
The property in CSS used to change the background color of an element is -
bgcolor
color
background-color
All of the above
The property in CSS used to change the text color of an element is -
background-color
color
bgcolor
All of the above
The CSS property used to control the element's font-size is -
text-style
text-size
None of the above
font-size
The HTML attribute used to define the inline styles is -
None of the above
class
styles
style
The HTML attribute used to define the internal stylesheet is -
script
html
style
css
Which of the following CSS property is used to set the background image of an element?
background-color
None of the above
background-image
background-attachment
Which of the following is the correct syntax to make the background-color of all paragraph elements to yellow?
p {background-color : #yellow;}
p {background-color : yellow;}
all {background-color : yellow;}
all p {background-color : #yellow;}
Which of the following is the correct syntax to display the hyperlinks without any underline?
a {text-decoration : none;}
a {text-decoration : underline;}
None of the above
a {decoration : no-underline;}
Which coding language helps create the layout/structure of the website?
html
css
javascript
java
p {color: red;}
Which of the following represents a domain name?
.gov
www.
https://
Fill in the blanks to create an order list starting at 10.
<_ _="10">
<li>HTML</li>
<li>CSS</li>
</ol>
(a)
Which one is correct HTML page structure ?
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<head>
<title></title>
</head>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<body>
</body>
<title></title>
</head>
</html>
<head>
<title></title>
</head>
<body>
</body>
Which one is Preserve Formatting Tag ?
<pft>
<pre>
<br>
<hr>
Which is the correct form for html style attributes?
value="property:style"
style="value:property"
style="property:value"
None of the above
Which of the following is the proper way to apply the CSS code inside style.css to the about.html file?
Inside style.css:
applyTo {
href: about.html;
}
Inside about.html:
<head>
<style href="style.css"></style>
</head>
Inside style.css:
<html href="about.html">
Inside about.html:
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
You are trying to apply the same style to several different elements in a block, with line breaks before and after. Which tag should you use?
<span>
<div>
<style>
<src>
placed within his webpage?
Comments in coding is used to help
the programmer
anyone viewing the website
the editor of the code
the reader of the code
How do you make the text bold in CSS code?
font:bold;
style:bold;
font-weight:bold;
href=bold
___________ are used to separate each selector in grouping.
#
.
;
,
Suppose there are 15 items in the list and you want to style the 9th item listed. What is the syntax used for it?
li:9th-child
li:nth-child(9)
li:last-child(9)
li:first-child(9)
Which CSS selector applies to the yellow element(s) only? Select the correct answers!
h1-.content{ ... }
h1#content{ ... }
.content h1{ ... }
#content h1{ ...}
none of the above
/* This is a multi-line comment */
Which of the following symbols indicates an ending tag in HTML?
;
/
<>
!
Which of the following lists includes EVERY type of code needed to make an unordered list?
<ab> ... <li> .... </li> ... </ab>
<unL> ... <li> .... </li> ... </unL>
<ol> ... <li> .... </li> ... </ol>
<ul> ... <li> .... </li> ... </ul>
When should you use the <ol> code to make a list?
Steps for a recipe
Top 10 items
List of names
None of the above
A collection of interlinked web pages on the World Wide Web is called?
Website
Research
Website Content
Web Address
You have a CSS element set up to display the figcaption element with a background color of antiquewhite. However the background color is running across the entire page even though the caption is not. Select the correct CSS code to have ONLY the background color on the text and NOT the width of the page:
figcaption {color: darkgreen;
background-color: antiquewhite;
________}
display: inline;
display: block;
display: left;
width: 200px
Which table tag indicates a table cell?
Tr
Table
Td
Th
You are constructing an external style sheet. You want hyperlinks to turn pink when a user moves the mouse over the link. Choose the proper selector to accomplish the task:
a:{color: slateblue;}
_________ {color: pink;}
a.hover
a:hover
a#hover
a[hover]
You are trying to set a default font color of maroon. Select the correct property and value combination to make this happen.
body {
________
}
font-color: maroon;
text-color: maroon;
background-color: maroon;
color: maroon;
Which of the following audio format is supported by HTML5?
.ogg
.wav
.mp3
All of the above
In how many ways can CSS be written in?
1
2
4
3
How can we write comments in CSS?
/* */
//
#
All of the above
In the below code snippet, in what order will the margins be added?
p { margin: 25px 50px 75px 100px; }
Top, Right, Bottom, Left
Top, Left, Bottom, Right
Top, Bottom, Right, Left
Right, Left, Top, Bottom
What are the different types of gradients in CSS?
Linear Gradients
Conic Gradients
Radial Gradients
All of the above
Explain these protocols.
