wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Simple HTML and CSS

Total questions: 55

Worksheet time: 13hrs 33mins

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>