NEW
Font size
WorksheetsCSS - Cascading Style Sheets
Total questions: 25
Worksheet time: 13mins
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>
Which of the following selects all elements with the class footer that are inside of divs?
div {
.footer {
...
}
}
.footer div {
...
}
div > .footer {
...
}
div .footer {
...
}
Which of the following selects all a tags that are immediate children/child selector of div tags?
div > a {
...
}
...
}
div < a {
...
}
div + a {
...
}
Why is it important to avoid repetitive code while creating a website?
Excessive code is harder to read and understand
It is easier to make edits to websites when CSS rules are strategically grouped and organized
It demonstrates good coding style
All of the above
Which of the following will turn the first letter of all p elements blue?
p::first-letter {
color=blue;
}
p:first-letter {
color=blue;
}
p::first-letter {
color: blue;
}
p:first-letter {
color: blue;
}
Which of the following selects images as the mouse hovers over them and sets their size to 350px by 350px?
img:hover {
width: 350px;
height: 350px;
}
img :hover {
width: 350px;
height: 350px;
}
img::hover {
width: 350px;
height: 350px;
}
img > hover {
width: 350px;
height: 350px;
}
Which of the following settings will not make an element invisible?
visibility: hidden
appearance: off
opacity: 0
display: none
True or False: Only CSS has online documentation because it is a more complex language than HTML.
True
False
True or False: None of the changes you make in the Inspector will be saved.
True
False
Which of the following defines border thickness so that the top and bottom borders are 10px thick and left and right borders are 5px thick?
border: 5px 10px 5px 10px
border: 5px 5px 10px 10px
border: 10px 10px 5px 5px
border: 10px 5px 10px 5px
What is the proper CSS format for background color?
back-ground color:orange:
backgroundcolor-orange;
background:color:orange;
background-color:orange;
Which is the correct CSS syntax?
body {color: yellow;}
body:color=yellow;
{body:color= yellow;}
{body;color: yellow;}
What symbol should you use to target a class name in css?
#
()
.
class
What symbol should you use to target an id in css?
.
+
id
#
TRUE OR FALSE: CSS is used to style web pages
True
False
How do you change the font color with CSS?
font-color: green;
color: green;
change-font-color: green;
fontcolor=green;
TRUE OR FALSE: All tags require a closing tag.
True
False
A type of style sheet language which is used in web design to describe the presentation of a document that is written in a markup language, such as HTML5. It is the code used to format the text in a webpage.
Tag
Meta Tag
Comment
CSS
#main { background-color: red; }
A:hover { color: blue; }
