wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CSS - test

Total questions: 81

Worksheet time: 1hrs 14mins

Name
Class
Date
1.
If you want to have more than one property for a CSS selector, what character separates them?
a)
comma (,)
b)
semi-colon (;)
c)
colon (:)
d)
dash (-)
2.
Where in the HTML document is the correct location to insert code to link to your external CSS? 
a)
In the <head> section
b)
In the <body> section
c)
At the very end of the document
d)
At the very beginning of the document
3.
Which is correct CSS syntax? 
a)
{ body; color=black;}
b)
body: color= black
c)
body {color:black;}
d)
(body color is black) 
4.
Select the code below that uses CSS to configure a background color of #000000 for a web page.
a)
body { background-color: #000000; }
b)
body { bgcolor: #000000; }
c)
document { background­-page: #000000; }
d)
None of these
5.
Which is the correct way to format a Font Family for a paragraph?
a)
p { font-face: Arial; }
b)
p { family-font: Arial; }
c)
p { font-family: Arial; }
d)
p { font: Arial; }
6.
What symbols go around the properties for each CSS selector?
a)
< >
b)
[ ]
c)
{ }
d)
( )
7.
Which CSS code is incorrect?
a)
a {color: blue;}
b)
p {font-size: 10px;}
c)
body {background-color="red";}
d)
img {width: 100%;}
8.
Which is the value in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
9.
Which is the selector for a link?
a)
a { }
b)
link { }
c)
href { }
d)
a href { }
10.
Which CSS code centers text?
a)
p {align: center;}
b)
p {text-align: center;}
c)
p {align=center;}
d)
p {center;}
11.
Which CSS code centers text?
a)
p {align: center;}
b)
p {align=center;}
c)
p {text-align: center;}
d)
p {center;}
12.

Change the border size of the body or image

a)

border-style

b)

border-width

c)

border-color

d)

width

13.

To create a dotted border around the page

a)

border-style

b)

border-width

c)

border-color

d)

width

14.

Set the color of the border

a)

border-style

b)

border-width

c)

border-color

d)

width

15.

sets the element to one side of the page

a)

margin

b)

width

c)

float

d)

height

16.

Select the rule set to make all the text in your web page blue and centered.

a)

p {

color: blue;

}

b)

body {

text-align: left;

color: blue;

}

c)

p {

text-align: center;

color: blue;

}

d)

body {

text-align: center;

color: blue;

}

17.

What is the correct HTML for referring to an external style sheet?

a)

<style src="mystyle.css">

b)

<stylesheet>mystyle.css</stylesheet>

c)

<link rel="stylesheet" type="text/css" href="mystyle.css">

18.

Which is the correct CSS syntax?

a)

body {color: yellow;}

b)

body:color=yellow;

c)

{body:color= yellow;}

d)

{body;color: yellow;}

19.

Which one is the correct syntax for CSS?

a)

property {selector : value}

b)

value {property : selector}

c)

selector {value : property}

d)

selector { property : value}

20.
http://www.google.com is an example of a what?
a)
URL
b)
IP address
c)
Browser
d)
Application
21.
What is the difference between HTML and CSS?
a)
CSS is one type of HTML
b)
HTML gives a webpage structure. CSS provides styling.
c)
CSS structures a webpage. HTML strictly provides styling.
d)
There is no difference.
22.
What does RGB stand for?
a)
Red, Green, & Blue
b)
this is not the right one
c)
Roger, George, & Ben
d)
Don't pick this one unless you are trying to fail!!
23.

An identifier that allows multiple elements in an HTML document to be styled in the same way

a)

Algorithm

b)

CSS class

c)

Style Sheet

d)

CSS

24.

A document that controls how a web page will appear.

a)

CSS class

b)

Style sheet

c)

HTML

d)

CSS

25.

A language that controls the way content on a website appears

a)

CSS

b)

HTML

c)

Javascript

d)

Pig Latin

26.

Color: rgb(255,255,255)

a)

Red

b)

Green

c)

Black

d)

White

27.

color: rgb(0,0,255)

a)

Red

b)

Green

c)

Blue

d)

Black

28.

color: rgb(0,255,0)

a)

Red

b)

Green

c)

Blue

d)

White

29.

color: rgb(0,0,0)

a)

Red

b)

Green

c)

White

d)

Black

30.

color: (255,0,0)

a)

Red

b)

Green

c)

Blue

d)

Black

31.

Which one of the following is an ID?

a)

.red

b)

#blue

c)

:white

d)

,yellow

32.
Which allows you to change the font?
a)
font-type
b)
font
c)
font-family
d)
text-font
33.
< div class="container" > would look like what in CSS?
a)
#container
b)
container
c)
.container
d)
:container
34.
< div id="new" > would look like what in CSS
a)
.new
b)
new
c)
.new-css
d)
#new
35.
which of these is correct?
a)
selector  { property: value;  }
b)
property  { selector: value;  }
c)
selector  { value: property;  }
d)
value  {  property: selector;  }
36.

The . symbol in CSS designates that a __________ is being selected.

a)

an id

b)

a class

c)

an image

d)

a link

37.

The # symbol in CSS designates that __________ is being selected.

a)

an id

b)

a class

c)

a table

d)

an image

38.

CSS rules are enclosed with ___________?

a)

< >

b)

( )

c)

{ }

d)

" "

39.

CSS rules starts with a ___________?

a)

selector

b)

tag

c)

code

d)

bracket

40.

What property would move all text in a paragraph to the right?

a)

text-align

b)

font-position

c)

word-spot

d)

text-movement

41.

What is wrong with this code -


p {

background-color=green ;

}

a)

;

b)

{

c)

}

d)

=

42.

What type of CSS uses a separate file?

a)

embedded

b)

inline

c)

external

43.

<span style="color: red;">word</span>

a)

inserts a hyperlink

b)

inserts a picture

c)

changes the color of a word to red

d)

does nothing

44.

width: 450px;

a)

sets the width of an element

b)

sets the color of an element

c)

does nothing

45.

What is the main difference between ID and Class selector?

a)

An ID selector is NOT unique, a class selector is unique

b)

An ID selector can be reused many times, a class selector can use only once.

c)

An ID selector can be used to identify only one element, the class selector can identify more than one.

d)

An ID selector can be used to identify more than one element, the class selector can identify only one element.

46.

Which of the following has the highest priority in CSS rule?

a)

Inline style

b)

Browser defaults

c)

Internal style sheet

d)

External style sheet

47.

If you would like to make the corners of your border rounded, which property would you use?

a)

border-circle

b)

border-round

c)

border-shape

d)

border-radius

48.
Which property is used to change the left margin of an element?
a)
padding-left
b)
margin-left
c)
indent
49.
How do you display hyperlinks without an underline?
a)
a {text-decoration:none;}
b)
a {decoration:no-underline;}
c)
 a {text-decoration:no-underline;}
d)
 a {underline:none;}
50.
Which CSS property controls the text size?
a)
text-style
b)
text-size
c)
font-size
d)
font-style
51.

What symbol should you use to target a class name in css?

a)

#

b)

()

c)

.

d)

class

52.
What does the position:fixed style do when styling an image?
a)
Pins an image in one place on the browser window even when the user scrolls the page content.
b)
Sizes an image to a fixed size no matter how big the user expands the browser.
c)
Places an image in a specific spot on the page relative to the text before it
d)
Places an image based on the users scroll position
53.
Jerry wants to insert a line break into his webpage. Which code should he use?
a)
<ul>
b)
<li>
c)
<br>
d)
<h1>
54.
What is the correct term for an HTML element without an end tag?
a)
Incomplete element
b)
Nested element
c)
Empty element
d)
Basic element
55.

<p> tag is for...

a)

Page of Text

b)

Picture

c)

Paragraph of text

d)

Pineapples

56.

How can I select all h1 tags that are immediate children of div tags?

a)

div h1 {

...

}

b)

div > h1 {

...

}

c)

div {

h1 {

...

}

}

d)

.h1 div {

...

}

57.

What is the function of the div tag?

a)

To define a section of an HTML page

b)

To group a block of elements together to format them with CSS

c)

To efficiently apply the same style to several different elements

d)

All of the above

58.

Which of the following is the proper way to link to the about.html page from the index.html page?

a)

<a href="about">About This Site</a>

b)

<a href="about.html">About This Site</a>

c)

<a href="/about">About This Site</a>

d)

<a href="/about.html">About This Site</a>

59.

What should your files end with?

a)

.css

b)

html

c)

index

d)

.html

60.

Is this the correct link to link to the style.css page?

<link rel="stylesheet" type="text/css" href="style.css">

a)

Yes

b)

No

61.

What are the 3 ways we select css elements?

a)

href

b)

class

c)

tag

d)

span

e)

id

62.

Which of the following selects all a tags that are immediate children of div tags?

a)

div > a {

...

}

b)

...

}

c)

div < a {

...

}

d)

div + a {

...

}

63.

Which of the following selects images as the mouse hovers over them and sets their size to 350px by 350px?

a)

img:hover {

width: 350px;

height: 350px;

}

b)

img :hover {

width: 350px;

height: 350px;

}

c)

img::hover {

width: 350px;

height: 350px;

}

d)

img > hover {

width: 350px;

height: 350px;

}

64.

Which of the following defines an animation change-color that changes the font color from green to red?

a)

@keyframes change-color {

from {color: green;}

to {color: red;}

}

b)

@animation change-color {

from {color: green;}

to {color: red;}

}

c)

@keyframes change-color {

color: {color: green, red;}

}

d)

@animation change-color {

color: {color: green, red;}

}

65.

The stylesheet is used to

a)

code the css page.

b)

link css to the html page.

c)

add css to notepad++

d)

link java script to the html page.

66.

What is the proper CSS format for background color?

a)

back-ground color:orange:

b)

backgroundcolor-orange;

c)

background:color:orange;

d)

background-color:orange;

67.

Every html page is required to have a linked CSS page.

a)

True

b)

False

68.

Comments in coding is used to help

a)

the programmer

b)

anyone viewing the website

c)

the editor of the code

d)

the reader of the code

69.

Every element of html coding must have an opening and closing tag.

a)

True

b)

False

70.

What is the proper way to code a website title using HTML

a)

title{

New Website}

b)

<title>New Website</title>

c)

.tile New Website

d)

<title>New Website<title>

71.

What HTML code is used to center the words on the page when the coding starts on the left margin?

a)

right-align;

b)

<center></center>

c)

left-align;

d)

<middle></middle>

72.

What is the correct code for a paragraph in CSS?

a)

P

b)

<p> </p>

c)

.p

d)

p{

}

73.
What is the difference between an HTML Tag and an HTML element?
a)
An HTML Tag is case sensitive and an HTML element is not case sensitive.
b)
An HTML Tag is always paired and an HTML element is an "empty" tag.
c)
An HTML Tag defines content and an HTML Element includes the opening and closing tags and everything in between.
d)
An HTML Tag defines content and an HTML Element gives additional meaning and content.
74.
Jerry wants to insert a line break into his webpage. Which code should he use?
a)
<ul>
b)
<li>
c)
<br>
d)
<h1>
75.
Which item refers to the start tag, the end tag and everything in between?
a)
HTML Element
b)
HTML Tag
c)
HTML Attribute
d)
CSS
76.
What is the proper code to insert an image named "frog.jpg"?
a)
<img src="frog" width="104" height="142">
b)
<img="frog.jpg" width="104" height="142">
c)
<img src="frog.jpg" width="104" height="142">
d)
<img ="frog" width="104" height"142">
77.
Annie wants the name of her product to be the main heading at the top of her webpage. Which tag defines
the main heading in a web document?
a)
<h3>Product</h3>
b)
<h5>Product</h5>
c)
<h1>Product</h1>
d)
<h6>Product</h6>
78.
Which tag defines the visible content of a web document?
a)
<head>
b)
<meta>
c)
<title>
d)
<body>
79.
What tag defines the beginning of a webpage?
a)
<html>
b)
<h1>
c)
<p>
d)
<body>
80.
Between which paired tags would the visible content of a webpage be displayed?
a)
<html></html>
b)
<head></head>
c)
<body></body>
d)
<title></title>
81.

HTML stands for

a)

Hyper Text Marker Language

b)

Hyper Text Marker Lingo

c)

Hyper Text Markup Language

d)

Hyper Text Markup Lingo