wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML &CSS

Total questions: 54

Worksheet time: 33mins

Name
Class
Date
1.

What are IFrames?

a)

Buttons that link to other websites

b)

Videos uploaded to your website

c)

The number of views your website has

d)

HTML pages embedded inside of other HTML pages

2.

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

3.

Which of the following correctly uses div to style multiple elements the same way?

a)

<div class="intro">

<h2>Welcome</h2>

<p>Hi, welcome to my page.</p>

</div>

b)

<div>

<h2 class="intro">Welcome</h2>

<p class="intro">Hi, welcome to my page.</p>

</div>

c)

<div>

.intro{

font-size: 16px;

font-style: italic;

}

<h2>Welcome</h2>

<p>Hi, welcome to my page.</p>

</div>

d)

<h2 div class="intro">Welcome</h2>

<p div class="intro">Hi, welcome to my page.</p>

4.

What is the difference between <span> and <div>?

a)

<span> is better for styling text, while <div> is better for styling images

b)

<span> is for styling multiple elements, while <div> is for styling single elements at a time

c)

<span> is used to group and style inline elements, while <div> creates a line break

d)

<span> is used to style elements, while <div> is used to embed parts of other websites

5.

Which of the following selects all p tags with the class alert and makes them red?

a)

p.alert {

color: red;

}

b)

p {

.alert {

color:red;

}

}

c)

.alert p{

color: red;

}

d)

p alert{

color: red;

}

6.

What is the reasoning behind the Don’t Repeat Yourself principle?

a)

It helps you stay under the HTML file character limit

b)

Repeated code makes it harder to read and edit

c)

HTML files with repeated code will take a very long time to load

d)

It makes a more clean and organized website for the user

7.

Which of the following is not a property that can hide the visibility of an element?

a)

opacity

b)

hidden

c)

visibility

d)

display

8.

What symbol should you use to target a class name in css?

a)

#

b)

()

c)

.

d)

class

9.

What is missing from this HTML skeleton?


<!DOCTYPE html>

<html>

<body>

</body>

</html>

a)

<head></head>

b)

<div></div>

c)

<img></img>

d)

<head>

10.

How do you change the font color with CSS?

a)

font-color: green;

b)

color: green;

c)

change-font-color: green;

d)

fontcolor=green;

11.

TRUE OR FALSE: All tags require a closing tag.

a)

True

b)

False

12.

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.

13.

Which of the following is the correct CSS link tag?

a)

<link rel="styles" href="stylesheet.css">

b)

<link href="stylesheet">

c)

<link rel="stylesheet" src="styles.css">

d)

<link rel="stylesheet" href="styles.css">

14.
What does HTML stand for?
a)
Hypertext Medium Language
b)
Hippo Tries Making Licorice
c)
Hypertext Markup Lingo
d)
Hypertext Markup Language
15.
Which of the following is NOT a function of the <title> </title> element?
a)
Defines a title in the browser tab.
b)
Provides a title for the page when added to favorites/bookmarks
c)
Creates the first heading on the index page of the website
d)
Displays a title for the page in search engine results
16.
Multimedia can be embedded in an HTML document.
a)
Yes
b)
No
17.
http://www.google.com is an example of a what?
a)
URL
b)
IP address
c)
Browser
d)
Application
18.
Google Chrome is an example of a what?
a)
URL
b)
Web browser
c)
IP address
d)
metal
19.
Which of the following is correct about RGB Values format of CSS colors?
a)
This color value is specified using the rgb( ) property.
b)
This property takes three values, one each for red, green, and blue.
c)
The value can be an integer between 0 and 255 or a percentage.
d)
�All of the above.
20.
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
21.
Which of the following property of a anchor element signifies an element that currently has the user's mouse pointer hovering over it?
a)
:link
b)
:visited
c)
�:hover
d)
:active
22.
�Which of the following selector matches a element based on its id?
a)
The Id Selector
b)
�The Universal Selector
c)
The Descendant Selector
d)
The Class Selector
23.
�Which of the following property specifies the bottom margin of an element?
a)
:margin
b)
:margin-bottom
c)
:margin-top
d)
:margin-left
24.
Which of the following property is used to underline, overline, and strikethrough text?
a)
text-indent
b)
�text-align
c)
�text-decoration
d)
�text-transform
25.
What does the .com domain represents?
a)
Education domain
b)
Commercial domain
c)
Network
d)
None of the above
26.
"Yahoo", "Infoseek" and "Lycos" are _________?
a)
Search Engines
b)
Browsers
c)
News groups
d)
None of the above
27.

A ________ is a software program to present and explore content on the World Wide Web.

a)

Word Processor

b)

Browser

c)

HTTP

d)

attribute

28.

____________ is a term used to describe how page elements are placed on the screen. For example, elements can be positioned left, right, or center.

a)

Attribute

b)

Style

c)

Alignment

d)

Properties

29.

The _____ ______ is a block element used to designate a list that is either numbered or alphabetical.

a)

<tr> tag

b)

<ol> tag

c)

<ul> tag

d)

<td> tag

30.

an _____ _____ stays in the same line as the code that surrounds the text.

a)

block element

b)

inline element

c)

HTML tags

d)

alt attribute

31.

a _____ _____ is any element that starts a new line (e.g., paragraph) and uses the full width of the page or container.

a)

inline element

b)

img href

c)

CSS ID

d)

block element

32.
Which language is used to create webpages?
a)
HTML
b)
CSS
c)
JavaScript
d)
All 3: HTML, CSS, and JavaScript
33.
Which selector is used to style the whole web page?
a)
html
b)
body
c)
p
d)
font-family
34.

In CSS, which selector would you use to select a paragraph with a class of "bright"?

a)

.bright

b)

#bright

c)

bright.p

d)

p bright

35.

Which tag should be a direct child of an unordered list?

a)

<ul>

b)

<li>

c)

<p>

d)

<body>

36.

What is Responsive Web Design?

a)

Using CSS on different parts of a web page

b)

Making HTML elements appear in a grid

c)

Controlling the font size of text on a page

d)

Making web pages look good on all devices

37.

What is an HTML element?

4 lines
38.

What is an HTML attribute?

4 lines
39.

Which of the following is the proper way to link to the about.html page from the index.html page?

a)

<a href="about">About This Site</a>

b)

<a href="/about.html">About This Site</a>

c)

<a href="about.html">About This Site</a>

d)

<a href="/about">About This Site</a>

40.

What are IFrames?

a)

Buttons that link to other websites

b)

Videos uploaded to your website

c)

The number of views your website has

d)

HTML pages embedded inside of other HTML pages

41.

Which of the following selects all p tags with the class alert and makes them red?

a)

p.alert {

color: red;

}

b)

p {

.alert {

color:red;

}

}

c)

.alert p{

color: red;

}

d)

p alert{

color: red;

}

42.

What are some ways to cut down on repetitive code in your website?

a)

Group together multiple selectors with commas

b)

Strategically plan ahead to make sure the site is coded concisely

c)

Use a div to style multiple elements

d)

All of the above

43.

Which of the following is not a property that can hide the visibility of an element?

a)

opacity

b)

hidden

c)

visibility

d)

display

44.

Which of the following will correctly display the words above?

a)

<h3> Eggs </h3>

<h1> Bacon </h1>

<h6> Waffles </h6>

b)

B<h1> Eggs </h1>

<h2> Bacon </h2>

<h3> Waffles </h3>

c)

<h6> Eggs </h6>

<h1> Bacon </h1>

<h3> Waffles </h3>

45.
What does HTML stand for?
a)
Hypertext Medium Language
b)
Hippo Tries Making Licorice
c)
Hypertext Markup Lingo
d)
Hypertext Markup Language
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 CSS stand for?

a)

Cascading Style Sheets

b)

Certain Styles Selected

c)

Certain Style Sandwiches

d)

Central Servicing Systems

48.

You are trying to apply the same style to several different elements in a block, with line breaks before and after. Which tag should you use?

a)

<span>

b)

<div>

c)

<style>

d)

<src>

49.

Which of the following defines border thickness so that the top and bottom borders are 10px thick and left and right borders are 5px thick?

a)

border: 5px 10px 5px 10px

b)

border: 5px 5px 10px 10px

c)

border: 10px 10px 5px 5px

d)

border: 10px 5px 10px 5px

50.

Which of the following defines an animation change-color that changes the font color from green to red?

a)

@keyframes change-color {

from {color: green;}

to {color: red;}

}

b)

@animation change-color {

from {color: green;}

to {color: red;}

}

c)

@keyframes change-color {

color: {color: green, red;}

}

d)

@animation change-color {

color: {color: green, red;}

}

51.
Which is the selector for a link?
a)
a { }
b)
link { }
c)
href { }
d)
a href { }
52.
Which is the property in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
53.
What unit of measurement does CSS use for size?
a)
px
b)
em
c)
%
d)
All work
54.
What is the difference between HTML and CSS?
a)
CSS is one type of HTML
b)
HTML gives a webpage structure. CSS provides styling.
c)
CSS structures a webpage. HTML strictly provides styling.
d)
There is no difference.