wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

CodeHS HTML Final Quiz Review

Total questions: 14

Worksheet time: 7mins

Name
Class
Date
1.

Which of the following is the proper format for an HTML tag?

a)

>h1<Content Affected by Tag >/h1<

b)

<h1>Content Affected by Tag<h1>

c)

<h1 Content Affected by Tag />

d)

<h1>Content Affected by Tag</h1>

2.

Which of the following best describes the difference between the domain and path of a URL?

a)

The domain specifies where the browser’s request should be sent.

The path specifies exactly what file is being requested.

b)

The domain specifies what kind of file is being requested.

The path specifies the name of the file being requested.

c)

The domain specifies the name of the file being requested.

The path specifies what kind of file is being requested.

d)

The domain specifies exactly what file is being requested.

The path specifies where the browser’s request should be sent.

3.

What is the domain of this URL:


www.example.com/home.html

a)

www

b)

home.html

c)

example.com

d)

HTML

4.

What is generated from the following HTML code:


<h1>Hello</h1>

<h3>Hello</h3>

<h6>Hello</h6>

a)
b)
c)
d)
5.

Which of the following classifies as metadata about a webpage?

a)

The tags that make up the body of the webpage

b)

A table on a webpage

c)

A list on a webpage

d)

The title of the webpage

6.

An image is hosted at

https://upload.wikimedia.org/wikipedia/commons/6/62/Big_and_little_dog.jpg


Which of the following is the proper HTML code to display this image on your webpage?

a)

<a href="https://upload.wikimedia.org/wikipedia/commons/6/62/Big_and_little_dog.jpg">

Image</a>

b)

<img>

https://upload.wikimedia.org/wikipedia/commons/6/62/Big_and_little_dog.jpg

</img>

c)

<img src="https://upload.wikimedia.org/wikipedia/commons/6/62/Big_and_little_dog.jpg">

d)

<img src="https://upload.wikimedia.org/wikipedia/commons/6/62/Big_and_little_dog.jpg"></img>

7.

Which of the following is a valid CSS rule?

a)

h1 {

color: blue;

}

b)

<h1> {

color: blue;

}

c)

h1 {

color="blue";

}

d)

h1 {

color=blue;

}

8.

Answer C

CSS rules have a selector that defines which HTML elements the rule applies to.


We’ve learned about the following CSS Selectors:


Select by tag name Select by class name Select by id name

Which of the following ranks the selectors from highest priority to lowest priority?

a)

Select by tag name, select by class name, select by id name

b)

Select by id name, select by tag name, select by class name

c)

Select by id name, select by class name, select by tag name

d)

Select by class name, select by id name, select by tag name

9.

What is the result of the following HTML code:

<ol>

<li>Bread</li>

<li>Milk</li>

<li>Eggs</li>

</ol>

a)
b)
c)
d)
10.

Suppose you are making a music streaming website and you want to make a page that displays a user’s music library.

Which of the following is the proper HTML code to create the following table:

a)

<table border="1">

<tr>

<td>Title</td>

<td>Artist</td>

<td>Length</td>

</tr>

<tr>

<td>Memory</td>

<td>Tom Misch</td>

<td>5:41</td>

</tr>

<tr>

<td>CD Jam</td>

<td>Rooney Pitchford</td>

<td>3:55</td>

</tr>

</table>

b)

<table border="1">

<tr>

<th>Title</th>

<th>Artist</th>

<th>Length</th>

</tr>

<tr>

<td>CD Jam</td>

<td>Rooney Pitchford</td>

<td>3:55</td>

</tr>

<tr>

<td>Memory</td>

<td>Tom Misch</td>

<td>5:41</td>

</tr>

</table>

c)

<table border="1">

<tr>

<th>Title</th>

<th>CD Jam</th>

<th>Memory</th>

</tr>

<tr>

<td>Artist</td>

<td>Rooney Pitchford</td>

<td>Tom Misch</td>

</tr>

<tr>

<td>Length</td>

<td>3:55</td>

<td>5:41</td>

</tr>

</table>

d)

<table border="1">

<tr>

<th>Title</th>

<td>CD Jam</td>

<td>Memory</td>

</tr>

<tr>

<th>Artist</th>

<td>Rooney Pitchford</td>

<td>Tom Misch</td>

</tr>

<tr>

<th>Length</th>

<td>3:55</td>

<td>5:41</td>

</tr>

</table>

11.

Which of the following statements are true about styling your web pages with CSS:


I. Styling with CSS is more scalable than using style= on each HTML tag that you want to style


II. You can create styles with CSS that are not possible using style= on an HTML tag

a)

I only

b)

II only

c)

I and II

d)

Neither I nor II

12.

Suppose you have written a web page using HTML and CSS and it is hosted at the URL yourdomain.com/home.html


Which of the following statements is true about which devices can view your website?

a)

Only browsers on desktop computers can view your website because only desktop browsers can render HTML based web pages.

b)

Only browsers on mobile phones can view your website because only mobile browsers can render HTML based web pages.

c)

Only computers made after the day you publish your website can view your website. Older computers can’t understand HTML and CSS.

d)

Any browser on any device will be able to view your webpage, because all browsers and devices on the Internet agree to use the same protocols for sending, receiving, and viewing webpages.

13.

Suppose you have the following CSS rules:

p {

color: green;

}


.fire {

color: red;

}


#title {

color: blue;

}

What font color will the following HTML element have after being styled by the given CSS:


<h1 class="fire">Welcome!</h1>

a)

red

b)

green

c)

blue

d)

black

14.

Answer is green

Suppose you have the following CSS rules:

p {

color: green;

}


.fire {

color: red;

}


#title {

color: blue;

}

What font color will the following HTML element have after being styled by the given CSS:


<p class="title">My First Paragraph</p>

a)

red

b)

green

c)

blue

d)

black