wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

HTML & CSS Basics

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

Which of the following codes starts a set of HTML code?

a)

<html>

b)

<doctype html>

c)

<!DOCTYPE HTML>

d)

<doctype><html>

2.

Which of the following symbols indicates an ending tag in HTML?

a)

;

b)

/

c)

<>

d)

!

3.

How do you set up the body for your html web page?

a)

<b>

b)

<bo>

c)

<body>

d)

<doc>

4.

Which of the following BEST explains the difference between a <p> tag and a <br> tag?

a)

The <br> tag produces a blank line, while the <p> tag does not

b)

The <p> tag produces a blank line, while the <br> tag does not

5.

Which of the following lists includes EVERY type of code needed to make an unordered list?

a)

<ab> ... <li> .... </li> ... </ab>

b)

<unL> ... <li> .... </li> ... </unL>

c)

<ol> ... <li> .... </li> ... </ol>

d)

<ul> ... <li> .... </li> ... </ul>

6.

When should you use the <ol> code to make a list?

a)

Steps for a recipe

b)

Top 10 items

c)

List of names

d)

None of the above

7.

When should you use the <ul> code to make a list?

a)

Top 5 Chef Favorites

b)

Ingredients list

c)

Steps to complete a recipe

d)

None of the above

8.

How do you make an image code?

a)

<img src="..." alt="...">

b)

<image source="..."> <alt>

</image> </alt>

c)

<image src="..." alt="...">

d)

None of the above

9.

What is the difference between HTML and CSS?

a)

HTML provides the content, CSS provides the pictures

b)

HTML provides the structure & content, CSS provides the color / look of the web page

c)

HTML and CSS are the same thing

d)

None of the above

10.

What is the proper way to reference an ID in the CSS?

(Note: Assuming that the ID is set up properly in the HTML)

a)

You would use a period: .idname

b)

You would use a number sign: #idname

11.

What is the proper way to reference a class in the CSS?

(Note: Assuming that the class is set up properly in the HTML)

a)

You would use a period: .classname

b)

You would use a number sign: #classname

12.

What is the purpose of using ID tags in HTML and CSS?

a)

To identify a word or phrase and make it stand out

b)

To identify a section of the HTML and make changes to it in CSS easier

c)

To identify a section of the HTML for the code, but it has nothing to do with CSS because they don't communicate for ID tags

13.

How can you select all of the h3 tags on the webpage at one time to change the font color to blue?

a)

#allh1s { color: blue; }

b)

#h1 {blu}

c)

h1 {color: blue;}

d)

<h1 font-color="blue">

14.

How would you select this paragraph by its ID in CSS?


<p id="intro">Welcome to our Intro to Computer Science and Web Design class! We are so happy that you are here. Please visit www.canvas.wcr7.org to get connected to our classroom site. Once there, please find the Modules tab and CLICK ON the DAILY SCHEDULE.</p>

a)

.p-intro { ... }

b)

#p-intro { ... }

c)

.intro { ... }

d)

#intro { ... }

15.

Which of the following would select only the images on the page with the class name of "icon" ?


<img class="icon" src="cat.gif">

<img class="icon" src="rabbit.gif">

<img src="balloon.gif">

<img src="truck.gif">

a)

#src { ... }

b)

.icon { ... }

c)

#icon { ... }

d)

.img-icon {... }