wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML & CSS

Total questions: 155

Worksheet time: 3hrs 35mins

Name
Class
Date
1.
Karen wants to begin a new line within a paragraph of text on a webpage. Which code should she use?
a)
<li>
b)
<h1>
c)
<hr>
d)
<br>
2.
Jerry wants to insert a line break into his webpage. Which code should he use?
a)
<ul>
b)
<li>
c)
<br>
d)
<h1>
3.
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>
4.
A properly coded HTML tag will always be found between which two symbols?
a)
( )
b)
{ }
c)
[ ]
d)
< >
5.
Which line of code correctly places a gif image named "tiger" into a webpage?
a)
<img src="tiger" alt="BengalTiger" />
b)
<img gif=tiger alt="BengalTiger">
c)
<image source="tiger.gif" alt=BengalTiger" />
d)
<img src="tiger.gif" alt="BengalTiger" />
6.
Which is the correct code to insert a horizontal line in a webpage?
a)
<hr>
b)
<br>
c)
<h1>
d)
<li>
7.

Which of the following is an opening HTML tag?

a)

</html>

b)

<<html>>

c)

<html>

d)

<html/>

8.

Which one of the following is a closing HTML tag?

a)

<html />

b)

</html>

c)

<</html>>

d)

<html>

9.

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

a)

#

b)

()

c)

.

d)

class

10.

What is the correct syntax to change the background color with css?

a)

background-color: purple;

b)

background-color = "purple";

c)

backgroundcolor=orange

d)

change-background-color: purple

11.

TRUE OR FALSE: HTML is used to style web pages.

a)

True

b)

False

12.

TRUE OR FALSE: CSS is used to style web pages

a)

True

b)

False

13.

What is missing from this HTML skeleton?


<!DOCTYPE html>

<html>

<body>

</body>

</html>

a)

<head></head>

b)

<div></div>

c)

<img></img>

d)

<head>

14.

What tag do you use to make a numbered list?

a)

<list>

b)

<ol>

c)

<li>

d)

<ul>

15.

How do you change the font color with CSS?

a)

font-color: green;

b)

color: green;

c)

change-font-color: green;

d)

fontcolor=green;

16.

TRUE OR FALSE: All tags require a closing tag.

a)

True

b)

False

17.

Where should you put the link tag to connect your CSS and HTML file?

a)

Between the <head> </head> in HTML

b)

Between the <body> </body> in HTML

c)

None of the above.

18.
Which of the following property is used as a shorthand to specify a number of other background properties?
a)
background-attachment
b)
background
c)
background-repeat
d)
background-position
19.
Choose the correct HTML tag for the smallest size heading?
a)
<heading>
b)
<h6>
c)
 <h1>
d)
<head>
20.
Name an element which doesn't have a closing tag.
a)
<img>
b)
<head>
c)
<body>
d)
<p>
21.
<!DOCTYPE> 
a)
Defines the document type
b)
Defines a comment
c)
Defines the document's body
d)
Defines information about the document
22.
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 (-)
23.
Which is correct CSS syntax? 
a)
{ body; color=black;}
b)
body: color= black
c)
body {color:black;}
d)
(body color is black) 
24.
What symbols go around the properties for each CSS selector?
a)
< >
b)
[ ]
c)
{ }
d)
( )
25.
A selector (ex: h1{ } ) can only have 1 property
a)
true
b)
false
26.
What is the function of the <p> tag?
a)
Defines a paragraph.
b)
Makes the text purple.
c)
It pushes the text to the right.
d)
Prints the webpage.
27.
You should save HTML files with which file extension?
a)
.htm
b)
.index
c)
.webpage
d)
.html
28.
The content of the web (such as your pictures, text, links) will show up here. 
a)
Head
b)
Body
c)
Style
d)
Folder
29.
The following tag will show a bulleted list
a)
<ul>
b)
<ol>
c)
<li>
d)
<list>
30.

Which web image format supports animation?

a)

PNG

b)

JPG

c)

SWF

d)

GIF

31.
Which tag is used to create a hyperlink?
a)
<a>
b)
<href>
c)
<b>
d)
<i>
32.
What is the correct syntax for inserting an image?
a)
<image source="untitled.jpg"/>
b)
<img src="untitled.jpg"/>
c)
<src img="untitled.jpg"/>
d)
<img scr="untitled.jpg"/>
33.

What tag is used for CSS when making internal style choices?

a)

<style>

b)

<css>

c)

<body>

d)

<script>

34.
What will happen to the text in blue?   <p>He named his car <i>The lightning</i>, because it was very fast.</p>
a)
the content will be displayed in italic
b)
the content will display an image
c)
the content defines text inserted into a document
35.
CSS stands for?
a)
Closed Source Style
b)
Crucial Style Sheets
c)
Cascading Style Sheets
d)
Corresponding Static Style
36.
What does HTML stand for?
a)
Hypertext Making Language
b)
Hyper Transfer Markup Language
c)
Hypertext Markup Language
d)
Hyper Transfer Making Language
37.
HTML Language uses
a)
Tabs
b)
Tags
c)
Punctuation
d)
Quotations
38.

</h1> is

a)

Heading Tag

b)

Headline Tag

c)

Half of a tag

d)

Closing heading tag

39.

Which one is used to set background color of a web page?

a)

background-colour

b)

background-color

c)

background-position

d)

background-image

40.

Why won't the following anchor tag work?

<a href=https://www.google.com/>click here</a>

a)

The link is incorrect. It should be ref, not href

b)

The URL is missing quotation marks

c)

There is no anchor tag in the code

d)

The href is missing a closing tag

41.
Where in your HTML document should you include the code <!DOCTYPE html>?
a)
body section
b)
doesn't matter
c)
last line
d)
first line
42.

An error in a program that prevents the program from running as expected.

a)

spider

b)

ant

c)

bug

d)

fly

43.

What does <li> stand for?

a)

list item

b)

last item

c)

lost item

d)

lazy idea

44.

Which line contains the error?

a)

2

b)

5

c)

7

d)

10

45.

Where does your internal CSS coding go?

a)

In the BODY

b)

In the HEAD

c)

After everything else

d)

In the H1

46.

If I wanted to change the entire background of my web page, I would add which of the following CSS tags?

a)

p

b)

h1

c)

#h1

d)

body

47.

What does a class do?

a)

adds color to words

b)

adds style to specific elements

c)

adds style to a whole page

d)

adds a lot more work

48.

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;

}

49.
Which is the selector in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
50.

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

51.

The ____________ property specifies what kind of border to display.

a)

border-style

b)

border-color

c)

border-width

d)

border-design

52.

The _________ property specifies the thickness of the four borders.

a)

border-style

b)

border-color

c)

border-width

d)

border-height

53.

The ____________ are used to create space around elements, outside of any defined borders.

a)

Margin

b)

Padding

c)

Border

d)

Box Model

54.

The ___________ is used to create space around an element's content, inside of any defined borders.

a)

Margin

b)

Padding

c)

Border

d)

Box Model

55.

Highlighted Text?

a)

<h> </h>

b)

<mark> </mark>

c)

<highlight> </highlight>

d)

<yellow> </yellow>

56.

HTML is what type of language ?

a)

Scripting Language

b)

Markup Language

c)

Network Protocol

d)

Programming Language

57.

Apart from <b> tag, what other tag makes text bold ?

a)

<fat>

b)

<emp>

c)

<black>

d)

<strong>

58.

What tag is used to display a picture in a HTML page?

a)

picture

b)

src

c)

img

d)

image

59.

Which HTML tag produces the biggest heading?

a)

<h7>

b)

<h5>

c)

<h3>

d)

<h1>

60.

What is the correct syntax to change the background color with css?

a)

background-color: purple;

b)

background-color = "purple";

c)

backgroundcolor=orange

d)

change-background-color: purple

61.

TRUE OR FALSE: HTML is used to style web pages.

a)

True

b)

False

62.

What is missing from this HTML skeleton?


<!DOCTYPE html>

<html>

<body>

</body>

</html>

a)

<head></head>

b)

<div></div>

c)

<img></img>

d)

<head>

63.

TRUE OR FALSE: CSS is used to style web pages

a)

True

b)

False

64.
Jerry wants to insert a line break into his webpage. Which code should he use?
a)
<ul>
b)
<li>
c)
<br>
d)
<h1>
65.
When using a text editor, what file extension(s) must be used when saving as a web document?
a)
txt
b)
html or htm
c)
doc
d)
css
66.
Which of the following is the proper way to code an inline style attribute?
a)
color=blue
b)
color="blue"
c)
color blue
d)
color=(blue)
67.

A ___________ is an icon, graphic, or text that links to another file or object. These are what allow web pages to connect to other web pages

a)

hyperlink

b)

HTML Tags

c)

browser

d)

<br>

68.
<!DOCTYPE> 
a)
Defines the document type
b)
Defines a comment
c)
Defines the document's body
d)
Defines information about the document
69.
Defines a paragraph
a)
<pr>
b)
<p>
c)
<para>
d)
<par>
70.
Google Chrome, Mozilla Firefox and Microsoft Edge are all examples of what?
a)
Search engines
b)
Websites
c)
Web Browsers
d)
Text editors
71.
Which is the correct HTML element for underlining text?
a)
<ul>
b)
<uline>
c)
<u>
d)
<under>
72.

What is the correct way to write a comment in HTML?

a)

/* comment */

b)

<!– comment –>

c)

ctrl + Ç

d)

<¡– comment –>

73.

What is the correct way to write a link in HTML?

a)

<link href=”#”>…<link>

b)

<a title=”#”>…</>

c)

<a src=”#”>…</a>

d)

<a href=”#”>…</a>

74.

What does CSS mean?

a)

Cascading Style Sheets

b)

Center Style Steels

c)

Calibre Style Sheet

d)

No answer is correct

75.

What is the correct order of the opening tags for a basic web structure?

a)

<body>, <head>, <html>

b)

<html>, <body>, <head>

c)

<html>, <head>, <body>

d)

<head>, <body>, <html>

76.
</h> is
a)
Header Tag
b)
Headline Tag
c)
Half of a tag
d)
Closing header tag
77.

td

a)

one cell in a header

b)

one column of a row

c)

one row of a column

d)

one data cell in a row

78.
The ......... .......... is the first page of the Web site. This page usually tells visitors what the site is about.
a)
home page
b)
main section
c)
subsections
d)
page
79.

Which tag does not need a closing tag?

a)

<a href>

b)

<head>

c)

<body>

d)

<img src>

80.
Which is NOT a web browser?
a)
Chrome
b)
Internet explorer
c)
FireFox
d)
Yahoo
81.
How would you centre a H2 heading?
a)
<h1 align="center">
b)
<h2 stickit="center">
c)
<h2 align=center>
d)
<h2 align="center">
82.

<th></th> is the code for .....

a)

a table row

b)

a table column

c)

a table header

d)

Thanos

83.

sets the color of words in a paragraph

a)

h1 {

color: pink;

}

b)

img {

color: pink;

}

c)

body {

color: pink;

}

d)

p {

color: pink;

}

84.

What does a class do?

a)

adds color to words

b)

adds style to specific elements

c)

adds style to a whole page

d)

adds a lot more work

85.

Which rule set would change the font size to 24?

a)

font-size: 24

b)

size: 24;

c)

font-size: 24;

d)

font size: 24;

86.
What is the function of the <p> tag?
a)
Defines a paragraph.
b)
Makes the text purple.
c)
It pushes the text to the right.
d)
Prints the webpage.
87.
You should save HTML files with which file extension?
a)
.htm
b)
.index
c)
.webpage
d)
.html
88.
Name an element which doesn't have a closing tag.
a)
<img>
b)
<head>
c)
<body>
d)
<p>
89.
The content of the web (such as your pictures, text, links) will show up here. 
a)
Head
b)
Body
c)
Style
d)
Folder
90.
Which of the following is the largest heading? 
a)
H2
b)
H3
c)
H4
d)
H6
91.
The following tag will show a bulleted list
a)
<ul>
b)
<ol>
c)
<li>
d)
<list>
92.
Which web image format supports both transparency AND animation?
a)
PNG
b)
JPG
c)
SWF
d)
GIF
93.
Which tag defines a numbered list?
a)
OL
b)
UL
c)
LI
d)
NL
94.
The default link color for hyperlinks:
a)
green
b)
blue
c)
purple
d)
red
95.
Which tag is used to create a hyperlink?
a)
<a>
b)
<href>
c)
<b>
d)
<i>
96.
What is the correct syntax for inserting an image?
a)
<image source="untitled.jpg"/>
b)
<img src="untitled.jpg"/>
c)
<src img="untitled.jpg"/>
d)
<img scr="untitled.jpg"/>
97.
There simple, easy-to-use programs allow you to enter, edit, save, and print text.
a)
text editor
b)
web browser
c)
domain name
d)
webmaster
98.
Which allows you to change the font?
a)
font-type
b)
font
c)
font-family
d)
text-font
99.
What tag is used for CSS?
a)
<style>
b)
<css>
c)
<body>
d)
<script>
100.
the tag <IMG> would insert what into a web page?
a)
Insert a title
b)
Insert a link
c)
Insert an image
101.
What will happen to the text in blue?   <p>He named his car <i>The lightning</i>, because it was very fast.</p>
a)
the content will be displayed in italic
b)
the content will display an image
c)
the content defines text inserted into a document
102.
What is will the highlighted tag do? <p>My favourite colour is blue<br>I support Southend United.
</p>
a)
it will make the text bold
b)
it will place the text on another line
103.
CSS stands for?
a)
Closed Source Style
b)
Crucial Style Sheets
c)
Cascading Style Sheets
d)
Corresponding Static Style
104.
Which is NOT a web browser?
a)
Chrome
b)
Internet explorer
c)
FireFox
d)
Yahoo
105.
What best describes CSS
a)
describes how HTML elements are displayed on screen
b)
To logically divide the document
106.
What does HTML stand for?
a)
Hypertext Making Language
b)
Hyper Transfer Markup Language
c)
Hypertext Markup Language
d)
Hyper Transfer Making Language
107.
HTML Language uses
a)
Tabs
b)
Tags
c)
Punctuation
d)
Quotations
108.

</h1> is

a)

Header Tag

b)

Headline Tag

c)

Half of a tag

d)

Closing header tag

109.
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
110.
Which is correct CSS syntax? 
a)
{ body; color=black;}
b)
body: color= black
c)
body {color:black;}
d)
(body color is black) 
111.
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; }
112.
What symbols go around the properties for each CSS selector?
a)
< >
b)
[ ]
c)
{ }
d)
( )
113.
Which is the value in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
114.
Which is the selector for a link?
a)
a { }
b)
link { }
c)
href { }
d)
a href { }
115.
Which is the selector in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
116.
Which is the property in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
117.
Which is the correct way to format a Font Family for a paragraph? (Hint: make sure you have more than one backup font!)
a)
p { font-face: Arial, Verdana, San-Serif; }
b)
p { font-family: Arial, Verdana, San-Serif; }
c)
p { family-font: Arial, Verdana, San-Serif; }
d)
p { font: Arial, Verdana, San-Serif; }
118.

Which one of the following is a selector?

body {

color: green;

border: 0;

}

a)

color

b)

body

c)

green

d)

border

119.

Which one is used to set background colour of a web page?

a)

background-colour

b)

background-color

c)

background-position

d)

background-image

120.

Why won't the following anchor tag work?

<a href=https://www.google.com/>click here</a>

a)

The link is incorrect. It should be ref, not href

b)

The URL is missing quotation marks

c)

There is no anchor tag in the code

d)

The href is missing a closing tag

121.
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.
122.
Where in your HTML document should you include the code <!DOCTYPE html>?
a)
body section
b)
doesn't matter
c)
last line
d)
first line
123.
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 (-)
124.

What type of tag is this: <!-- -->

a)

comments

b)

questions

c)

paragraph

d)

image

125.

Which is the correct HTML order...?

a)

<html> <head> </head> <body> </body> </html>

b)

<html> <head> </head> <body> </html> </body>

c)

<html> <body> </body> <head> </head> </html>

d)

<head> </head> <body> </body> <html> </html>

126.
Which is correct CSS syntax? 
a)
{ body; color=black;}
b)
body: color= black
c)
body {color:black;}
d)
(body color is black) 
127.
What symbols go around the properties for each CSS selector?
a)
< >
b)
[ ]
c)
{ }
d)
( )
128.
How can you make a numbered list?
a)
<list>
b)
<ol>
c)
<dl>
d)
<ul>
129.
Which is the value in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
130.
How can you make a bulleted list?
a)
<ol>
b)
<ul>
c)
<list>
d)
<dl>
131.
John wants the name of his book to appear in search results for Google. Where should this information be
placed within his webpage?
a)
head
b)
meta
c)
body
d)
nav
132.

What is missing from this HTML skeleton?


<!DOCTYPE html>

<html>

<body>

</body>

</html>

a)

<head></head>

b)

<div></div>

c)

<img></img>

d)

<head>

133.
What is the function of the <p> tag?
a)
Defines a paragraph.
b)
Makes the text purple.
c)
It pushes the text to the right.
d)
Prints the webpage.
134.
Which of the following is NOT a function of the <title> </title> element?
a)
Defines a title in the browser tab.
b)
Provides a title for the page when added to favorites/bookmarks
c)
Creates the first heading on the index page of the website
d)
Displays a title for the page in search engine results
135.
What is the correct HTML element for inserting a line break?
a)
<lb>
b)
<br>
c)
<break>
d)
<bk>
136.
Choose the correct tag for the largest heading:
a)
h6
b)
heading
c)
head
d)
h1
137.
http://www.google.com is an example of a what?
a)
URL
b)
IP address
c)
Browser
d)
Application
138.
Karen wants to begin a new line within a paragraph of text on a webpage. Which code should she use?
a)
<li>
b)
<h1>
c)
<hr>
d)
<br>
139.
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">
140.
Which tag defines the visible content of a web document?
a)
<head>
b)
<meta>
c)
<title>
d)
<body>
141.
When using a text editor, what file extension(s) must be used when saving as a web document?
a)
txt
b)
html or htm
c)
doc
d)
css
142.
Which tag provides information about a web site?
a)
<body>
b)
  <html>
c)
<meta>
d)
<title>
143.
Which is the selector in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
144.
Which line of code correctly creates a link to Amazon's website?
a)
<a ref=http://www.amazon.com>Amazon
b)
<href=http://www.amazon.com>Amazon<a>
c)
<a href="http://www.amazon.com">Amazon
d)
<a href="http://www.amazon.com">Amazon</a>
145.

All html tags use closing tags that start with </

a)

True

b)

False

146.
What is the correct HTML for adding a background color?
a)
<body color=”yellow”>
b)
<body bgcolor=”yellow”>
c)
<background>yellow</background>
d)
<body background=”yellow”>
147.

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

a)

True

b)

False

148.
How many heading are there?
a)
5
b)
6
c)
4
d)
3
149.

What are IFrames?

a)

Buttons that link to other websites

b)

Videos uploaded to your website

c)

The number of views your website has

d)

HTML pages embedded inside of other HTML pages

150.

which html elements we use inside the <head> </head> element?

a)

Body

b)

Meta

c)

Title

d)

Html

151.

Which tags go around the entire HTML document?

a)

<body></body>

b)

<html></html>

c)

<head></head>

d)

<h1></h1>

152.
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 (-)
153.
Which is the correct code to insert a horizontal line in a webpage?
a)
<hr>
b)
<br>
c)
<h1>
d)
<li>
154.
<!DOCTYPE> 
a)
Defines the document type
b)
Defines a comment
c)
Defines the document's body
d)
Defines information about the document
155.
What is the correct HTML for making a text area?
a)
<textarea>
b)
input type="textbox">
c)
<input type="textarea">
d)
<text>