wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Online Quiz in HTML and CSS Prepared by Pele Flores

Total questions: 68

Worksheet time: 34mins

Name
Class
Date
1.

What does HTML stand for??

a)

Home Training Metric Length

b)

Homogenous Technical Support

c)

Hype Tense Microsoft Level

d)

Hyper Text Markup Language

2.

Which set contains all of the DEFAULT tags needed to create a webpage?

a)

<!DOCTYPE html>

<html>

<head>

</head>

<body>

<main>

</main>

</body>

</html>

b)

<html>

<head>

</head>

<body>

</body>

</html>

c)

<!DOCTYPE html>

<html>

<head>

</head>

</html>

d)

<!DOCTYPE html>

<html>

<head>

</head>

<body>

</body>

e)

<!DOCTYPE html>

<html>

<head>

<title>

</title>

</head>

<body>

</body>

</html>

3.

Choose the correct HTML element for the largest heading:

a)

<head>

b)

<h1>

c)

<heading>

d)

<h6>

4.

<p> is the opening tag for a _____________

a)

page

b)

paragraph

c)

preorder

d)

period

5.

What defines the beginning and ending of the visible part of a webpage?

a)

<head> main part of the document </body>

b)

<body> main part of the document </html>

c)

d) </body> main part of the document <html>

d)

<body> main part of the document </body>

6.

What is the correct syntax for defining a hyperlink in HTML?

a)

<a href=”url”> Link text </a>

b)

<a href=”url”> Link text <a>

c)

<a=”url”> Link text <a>

d)

<ref=”url”> Link text <a>

7.

Which character is used to indicate an end tag?

a)

!

b)

#

c)

/

d)

\

8.

How can you make a list that has no particular order?

a)

<ol> </ol>

b)

<ul> </ul>

c)

<ol> <li>

d)

<li> </ul

9.

You need a closing tag for an image without text

a)

True

b)

False

10.

Which of the following contains a nested list

a)

<ul>

<li>Apples</li>

<li>Cookies</li>

<li>Milk</li>

</ul>

b)

<ul>

<li>Apples</li>

<li>

Cookies

<ul>

<li>Chocolate Chip</li>

<li>Peanut Butter</li>

</ul>

</li>

<li>Milk</li>

</ul>

11.

The "href" of an anchor tag and the "src" of an image tag are both examples of an

(a)  

12.

Where does the content of the <title> element show up in the browser?

a)

At the top of the page.

b)

In the browser tab.

c)

It's metadata, so it doesn't show up.

d)

At the bottom of the page.

13.

What tag adds an image to the page?

a)

<image>

b)

<pic>

c)

<img>

14.

Which of the following are inline elements?

a)

<span>

b)

<p>

c)

<h1>

d)

<em>

e)

<div>

15.

"/images/portrait.png" is an example of a(n) _______ url.

a)

relative

b)

absolute

16.
How can you open a link in a new tab/browser window?
a)
<a href="url" target="_blank">
b)
<a href="url" target="new">
c)
<a href="url" new>
17.
Which of these elements are all <table> elements?
a)
<table><tr><td>
b)
<thead><body><tr>
c)
<table><head><tfoot>
d)
<table><tr><tt>
18.
Inline elements are normally displayed without starting a new line.
a)
True
b)
False
19.
How can you make a numbered list?
a)
<list>
b)
<ol>
c)
<dl>
d)
<ul>
20.
How can you make a bulleted list?
a)
<ol>
b)
<ul>
c)
<list>
d)
<dl>
21.
What is the correct HTML for making a checkbox?
a)
<check>
b)
<input type="checkbox">
c)
<checkbox>
d)
<input type="check">
22.
What is the correct HTML for making a text input field?
a)
<textinput type="text">
b)
<input type="textfield">
c)
<textfield>
d)
<input type="text">
23.
What is the correct HTML for inserting a background image?
a)
<background img="background.gif">
b)
<body style="background-image:url(background.gif)">
c)
<body background=”background.gif”>
d)
<background.gif">
24.

Which is the proper way to write an h1 tag

a)

<h1>Hello</h1>

b)

<h1>"Hello

c)

{h1}Hello{/h1}

d)

<h1>Hello<h1>

25.

Which of the following codes would create a horizontal line

a)

<br>

b)

<h1></h1>

c)

<hr>

d)

<p>

26.

Which code below is correct for a hyperlink

a)

<a>

"https://google.com"

Click Me

</a>

b)

<a>Click Me>

"https://google.com"

</a>

c)

<a herf="https://google.com">

Click Me

</a>

d)

<a href="https://google.com">

Click Me

</a>

27.

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

a)

a table row

b)

a table column

c)

a table header

d)

Thanos

28.

Which of the following is the code for a paragraph to be blue?

a)

<td style=“background-color:blue;”>

b)

<h1 style=“font-size:60px;”>

c)

<p style=“color:blue;”>

d)

<tagname style=“property:value;”>

29.

When working with color codes RGB stands for...

a)

Green Red Purple

b)

Red Great Blue

c)

Red Green Blue

d)

Blue Green Raspberry

30.

You should save HTML files with which file extension?

a)

.htm

b)

.webpage

c)

.html

d)

.index

31.

This coding is used to create a paragraph:

a)

<pr></pr>

b)

<paragraph></paragraph>

c)

<p><p>

d)

<p></p>

32.

HTML tags are always surrounded by

a)

( )

b)

< >

c)

{ }

d)

" "

33.

Which tag pair is used to create the largest heading?

a)

<h1></h1>

b)

<h3></h3>

c)

<h5></h5>

d)

<h7></h7>

34.

Everything visible on a web page goes between these two tags.

a)

<body> </body>

b)

<title> </title>

c)

<head> </head>

d)

<p> </p>

35.

Which of the following creates the smallest header?

a)

<h1></h1>

b)

<h2></h2>

c)

<h5></h5>

d)

<h6></h6>

36.

When coding an ordered or unordered list, each separate item in the list uses this tag:

a)

<list></list>

b)

<li></li>

c)

<item></item>

d)

<ul></ul>

37.
What does the tag <br> indicate?
a)
ordered list
b)
image
c)
paragraph
d)
break
38.
The <strong> tag will ___________ the text.
a)
Capitalize
b)
Bold
c)
Italicize
d)
Underline
39.
These simple, easy-to-use programs allow you to enter, edit, save, and print text.
a)
text editor
b)
web browser
c)
domain name
d)
search engine
40.
HTML uses
a)
Tabs
b)
Tags
c)
Labels
d)
Quotes
41.
Google, Bing and Yahoo are all examples of what?
a)
Web browsers
b)
Search engines
c)
Web engines
d)
Text editors
42.
What is an HTML element?
a)
The starting tag
b)
The ending tag
c)
The content between the tags
d)
Everything from start to end tag
43.
Which is the correct HTML element for underlining text?
a)
<ul>
b)
<uline>
c)
<u>
d)
<under>
44.

(a)   is an attribute that adds information about the style of the HTML element, such as color, font, size, etc.

45.

The CSS (a)   property defines the background color for an HTML element.

46.

The CSS (a)   property defines the text color for an HTML element:

47.

The CSS (a)   property defines the font to be used for an HTML element

48.

The CSS (a)   property defines the text size for an HTML element

49.

The CSS (a)   property defines the horizontal text alignment for an HTML element

50.

Which of the following lines of code in html has invalid command?


(1) <DOCTYPE html>

(2) <html>

(3) <body>

(4) </body>

(5) </html>

a)

1

b)

2

c)

3

d)

4

e)

5

51.

Which of the following lines of code in html has invalid command?


(1) <title>Page Title</title>

(2) </head>

(3) <body>

(4) <h1 This is a Heading /h1>

(5) <p>This is a paragraph.</p>

a)

1

b)

2

c)

3

d)

4

e)

5

52.

Which of the following lines of code in html has invalid command?


(1) <h1> <This is heading> </h1>

(2) <a href="https://www.w3schools.com">This is a link</a>

(3) <p>This is a paragraph.</p>

(4) <img src="w3schools.jpg" alt="W3Schools.com" width="104" height="142">

a)

1

b)

2

c)

3

d)

4

53.

Which of the following lines of code will successfully insert a command button in html?


(1) <button> <Click me> </button>

(2) </button> Click me </button>

(3) <button> Click me <\button>

(4) <button> Click me </button>

a)

1

b)

2

c)

3

d)

4

54.

Which of the following lines of code in html has invalid command?


(1) <ul>

(2) <li>Coffee</li>

(3) <li>Tea</li>

(4) <li>Milk</li>

(5) <?/ul>

a)

1

b)

2

c)

3

d)

4

e)

5

55.

What will be the result when we use the following code in html?


<p> This subject <br> teaches me <br> html coding. </p>

a)

This subject

teaches me

html coding

b)

This subject teaches me html coding

c)

This subject br teaches me br html coding

d)

This subject <br> teaches me <br> html coding

56.

What will be the result when we use the following code in html?


<body style=background-color:powderblue;>

a)

background color will be changed in powderblue

b)

text will be changed to powderblue

c)

Nothing will happen because there is an error in the code

d)

everything including text color will be changed powderblue

57.

The text-align property defines the horizontal text alignment for an HTML element.

a)

True

b)

False

58.

In the following code what represents the name "picture"?


<img src="c:/picture/img_girl.jpg">

a)

folder name

b)

drive name

c)

filename

d)

computer name

59.

HTML links are defined with the <a> tag.

a)

True

b)

False

60.

The <hr> tag defines a thematic break in an HTML page, and is most often displayed as a horizontal rule.

a)

True

b)

False

61.

Which of the following lines of code in html has invalid command?


(1) <p>This is some text.</p>

(2) <hr>

(3) <h2>This is heading 2</h2>

(4) <p>This is some other text.</p>

(5) </hr>

a)

1

b)

2

c)

3

d)

4

e)

5

62.

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

63.

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

64.

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

65.

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">

66.

What correction needs to be made in the code

a)

line 13 - <p> </p> tags needed

b)

line 13 - <li> </li> tags needed

c)

line 13 - <h6> </h6> tags needed

d)

line 13 <par> </par> tags needed

67.

CSS stands for

a)

Code Style Sheet

b)

Coding Style Sheet

c)

Cascading Sheet Style

d)

Cascading Style Sheet

68.

What is the correct code to change the font size of a paragraph in CSS to 16 points?

a)

h1 {

font-size: 16px;

}

b)

p {

size: 16px;

}

c)

p {

font-size: 16;

}

d)

p {

font-size: 16px;

}