wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

HTML & CSS Quiz

Total questions: 50

Worksheet time: 24mins

Name
Class
Date
1.
What is the correct term for an HTML element without an end tag?
a)
Incomplete element
b)
Nested element
c)
Empty element
d)
Basic element
2.
Body tags are used;
a)
Used for only the header
b)
Used only for the paragraph
c)
element that wraps everything that is visible on the page.
d)
Not used in HTML
3.
Style tags are used to;
a)
Apply style to one line
b)
Not used in HTML
c)
Used at the top of the page to apply a style to the entire document
d)
Used sparingly
4.

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;”>

5.

Which of the following codes would create a horizontal line

a)

<br>

b)

<h1></h1>

c)

<hr>

d)

<p>

6.

<p> tag is for...

a)

Page of Text

b)

Picture

c)

Paragraph of text

d)

Pineapples

7.

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>

8.

HTML stands for...

a)

Hyper Time Multiple Language

b)

Hyper Text Mark-up Language

c)

Hippo T-Rex Mascot Lemur

d)

Hipper Text Make Language

9.

The tag used for starting a new line is _______.

a)

<BR>

b)

<HR>

c)

<MR>

10.

The text inside the <TITLE> tag is displayed on the _____.

a)

Menu Bar

b)

Title Bar

c)

Status Bar

11.

HTML coding involves using ____________ to create webpages.

a)

Tabs

b)

Tags

c)

Labels

d)

Quotes

12.
Which of the following is the largest heading? 
a)
h2
b)
h3
c)
h4
d)
h6
13.
Google Chrome, Mozilla Firefox and Microsoft Edge are all examples of what?
a)
Search engines
b)
Websites
c)
Web Browsers
d)
Text editors
14.

The beginning tag works like the "on" switch and the ending tag works like the "off" switch.

a)

True

b)

False

15.

Which of the following creates the smallest header?

a)

<H2><./H2>

b)

<H3></H3>

c)

<H4></H4>

d)

<H6></H6>

16.

Who is considered by many to be the "Father of the World Wide Web" and the creator of HTML?"

a)

Tim Berners-Lee

b)

Tim Cook

c)

Tim Sweeney

17.

“WWW” is the abbreviation for which of the following?

a)

World Without Websites

b)

World Wide Web

c)

Workforce Wide Web

d)

World Wide Watch

18.
HTML tags are always surrounded by
a)
( )
b)
{ }
c)
< >   
d)
"  "
19.
Which character is used to indicate an end tag?
a)
*
b)
<
c)
/
d)
^
20.
Which is the correct HTML element for underlining text?
a)
<ul>
b)
<uline>
c)
<u>
d)
<under>
21.

Which tag configures the next element or portion of text to display on a new line?

a)

<line>

b)

<nl>

c)

<br>

d)

<new>

22.

What is the default horizontal alignment for elements on a webpage?

a)

center

b)

left

c)

right

d)

wherever you type them in the source code

23.

Which of the following is the CSS property used to

set the background color of a web page?

a)

bgcolor

b)

background-color

c)

color

d)

none of the above

24.

Which type of CSS is coded in the body of the web

page as an attribute of an HTML tag?

a)

embedded

b)

inline

c)

external

d)

imported

25.
What does CSS stand for? 
a)
Creative Style Sheets
b)
Cascading Style Sheets
c)
Colorful Style Spread
d)
Computer Style Spread
26.
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
27.
You should save HTML files with which file extension?
a)

.hmt

b)
.index
c)
.webpage
d)
.html
28.
What is the function of a title tag?
a)
stores webpage title for browser and search engine results
b)
show server how to index the website
c)
shows meta information about the title
d)
shows server how to title the website
29.
If you want to have more than one declaration in a CSS rule, what character separates them?
a)
comma ,
b)
semi-colon ;
c)
colon :
30.
Jerry wants to insert a line break into his webpage. Which code should he use?
a)
<ul>
b)
<li>
c)
<br>
d)
<h1>
31.

An _______ is used to change the appearance of the whole website.

a)

Internal Style Sheet

b)

External Style Sheet

c)

Inline Style Sheet

d)

None of these

32.

A _________ is a type of attribute of HTML tag.

a)

value

b)

property

c)

declaration

33.

To center the text inside an element, you can use ________ attribute of text.

a)

center

b)

align

c)

margin

34.

HTML provides the structure of the page and _______ the visual layout.

a)

CSS

b)

Attributes

c)

Tags

35.

Each property has a name and a value, separated by a ________

a)

semi-colon (;)

b)

colon (:)

c)

comma (,)

36.

CSS <style> tags go between ...

a)

<title> </title>

b)

<body> </body>

c)

<h1> </h1>

d)

<head> </head>

37.

How do you change font sizes in CSS?

a)

font-family: 20pt;

b)

font-weight: 20pt;

c)

font-size: 20pt;

d)

font-align: 20px;

38.
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
39.
CSS controls the.....
a)
Coding
b)
Subject Matter
c)
Style
d)
Robots
40.
<html>
a)
Gives you structure and text
b)
Not needed when creating HTML sites
c)
Goes after the <h1>
d)
Goes after the <body>
41.

_________ points to the HTML element you want to style.

a)

Selector Point

b)

Value

c)

Property

d)

CSS File

42.

Using __________ attribute of relevant tag, you can apply style sheet rules directly to any HTML element.

a)

style

b)

background

c)

heading

d)

link

43.

A _________ is a type of attribute of HTML tags.

a)

value

b)

property

c)

declaration

d)

none of these

44.

Each ________ is separated by semicolon.

a)

selector

b)

property

c)

declaration

45.

_________ contains one or more declarations.

a)

Property

b)

Value

c)

Selector Point

d)

Font

46.

sets the color of words in a paragraph

a)

h1 {

color: pink;

}

b)

img {

color: pink;

}

c)

body {

color: pink;

}

d)

p {

color: pink;

}

47.

Which selector will change the font of the text?

a)

font-size

b)

text-align

c)

font-famiy

d)

text-decoration

48.

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

49.

Which one is the largest heading?

a)

h1

b)

h2

c)

h4

d)

h6

50.

Which one is the smallest heading?

a)

h1

b)

h2

c)

h4

d)

h6