wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML & CSS

Total questions: 60

Worksheet time: 1hrs 7mins

Name
Class
Date
1.

<p ---------="About W3Schools">W3Schools is a web developer's site.</p>

a)

title

b)

class

c)

head

2.

<p>WWF's mission is to stop the ------degradation-------- of our planet's natural environment.</p>

ADD EXTRA IMPORTANCE TO DEGRADATION

a)

<strong>

</strong>

b)

<mark>

</mark>

3.

<html>

<body style="------------:yellow;">

<h1>This is a heading</h1>

<p>This is a paragraph.</p>

</body>

</html>

Use CSS to set the background color of the document to yellow.

a)

bg-color

b)

background-color

c)

background-colour

4.

Add the correct HTML attribute to display the"smiley.png" image

<img=----------------->

a)

src="smiley.png"

b)

source="smiley.png"

c)

image="smiley.png"

d)

alt="smiley.png"

5.

Add a line break in the middle of the paragraph:

<p>My Bonnie lies----------over the ocean.</p>

a)

<img>

b)

<br>

c)

<hr>

d)

<html>

6.

Set the top padding of <h1> element to 30px;

<style>

h1 {

------ : 30px;

}

</style>

a)

padding-left

b)

padding-top

c)

padding-bottom

d)

padding-right

7.

In CSS rem stands for

a)

1rem equals the font size of the html element

b)

1rem equals the font color of the html element

c)

1rem equals the font-family of the html element

8.

HTML is what type of language?

a)

Markup language

b)

Scripting language

c)

Programming language

9.

Who is known as the father of World Wide Web (WWW)?

a)

Tim Thompson

b)

Tim berners Lee

c)

Charles Darwin

10.

Which tag is used to display pre-formatted text?

a)

<pre>......</pre>

b)

<p>....</p>

c)

<prefor>......</prefor>

11.

How to embed audio files in HTML?

a)

<embed src = “audio.mp3” width = “50” height = “10”>

b)

<embed sound = “audio.mp3” width = “50” height = “10”>

c)

<embed audio = “audio.mp3” width = “50” height = “10”>

d)

<embed music = “audio.mp3” width = “50” height = “10”>

12.

What is iframe used for in HTML?

a)

To display a web page within a web page.

b)

To display a web page with an animation effect.

c)

To display a web page without a browser.

d)

All the answers are true

13.

The nav bar defines the_______

a)

nav link

b)

Navigation link

14.

In the form below, add an input field with the type "button" and the value "OK".

<form>

<------------->

</form>

a)

<input type="button" value=ok>

b)

<input type="button" value="OK">

15.

Use CSS to display an iframe with no borders.

<iframe src="https://www.w3schools.com"

style="--------">

</iframe>

a)

border: none;

b)

Border;None:

16.

Use the correct HTML attribute to display uppercase roman numbers.

<ol---------> 

 <li>Coffee</li>

  <li>Tea</li>  

li>Milk</li>

</ol>

a)

type="A"

b)

type="I"

c)

Type="i"

d)

Type="a"

17.

How to align text in HTML?

a)

text-align: center;

b)

align-text: left;

18.

What are void elements in HTML?

a)

<img>

b)

<br>

c)

<hr>

d)

All the above

19.

Disable the input field below.

<form action="/action_page.php">

<input type="text"------------>

</form>

a)

corrected

b)

disabled

c)

checked

20.

Highlight the word "FUN" in the text below.

<p>HTML is ------FUN------ to learn!</p>

a)

<highlight.

</highlight>

b)

<mark>

</mark>

21.

Add extra importance to the word "degradation" in the paragraph below.

<p>WWF's mission is to stop the --------degradation ---------------of our planet's natural environment.</p>

a)

<strong>

</strong>

b)

<b>

</b>

22.

Use an HTML element to add quotation marks around the letters "cool".

<p>I am so -----cool.-----</p>

a)

<Q>

</Q>

b)

<q>

</q>

23.

Use the correct HTML attribute, and CSS, to set the color of the paragraph to "blue".

<p ="----- ;-------">This is a paragraph.</p>

a)

style="color:blue;"

b)

style="colour:blue;"

24.

Set the max numbers of characters allowed in the input field to 40.

<form action="/action_page.php">

<input type="text"------>

</form>

a)

max length=40

b)

maximum length=40

25.

Add a list item with the text "Coffee" inside the <ul>

<ul>

----Coffee---

</ul>

a)

<li>

</li>

b)

<LI>

</LI>

26.

Change the border size of the body or image

a)

border-style

b)

border-width

c)

border-color

d)

width

27.

What css rule creates a flexbox container?

a)

flex: box

b)

display: flexbox

c)

flex: container

d)

display: flex

28.

What are the two options for flex-direction?

a)

row

b)

vertical

c)

column

d)

horizontal

29.

Which css value forces flex items onto a new line once the width of the container has been filled?

a)

newline

b)

wrap

c)

continue

d)

float

30.

Which flexbox properties aligns items on the same axis as the flex-direction?

a)

justify-content

b)

align-items

c)

align-content

d)

justify-items

31.

The CSS overflow property controls what happens to content that is too big to fit into an area.

a)

True

b)

False

32.

Which of the following values does not belong to the overflow property?

a)

visible

b)

hidden

c)

scroll

d)

invisible

33.
What does CSS stand for? 
a)
Creative Style Sheets
b)
Cascading Style Sheets
c)
Colorful Style Spread
d)
Computer Style Spread
34.
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
35.
Which is correct CSS syntax? 
a)
{ body; color=black;}
b)
body: color= black
c)
body {color:black;}
d)
(body color is black) 
36.
What symbols go around the properties for each CSS selector?
a)
< >
b)
[ ]
c)
{ }
d)
( )
37.
Which is the value in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
38.
Which is the selector for a link?
a)
a { }
b)
link { }
c)
href { }
d)
a href { }
39.
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.
40.

In CSS, colors can also be specified using RGB values, HEX values, HSL values, RGBA values, and HSLA values.

a)

True

b)

False

41.
What 2 types of languages have you learned about in Tech Arts? (Not including java script)
a)
html and coding
b)
css and html
c)
English and Spanish
d)
binary and c++
42.
If you added an h1 tag, what would it look like?
a)
The smallest heading in html language
b)
This tag does not exist.
c)
The largest heading in html language
d)
A different colored heading
43.
Html language...
a)
is the coding used to create Websites
b)
is the coding used to create font sizes and colors
c)
is the coding used to create drawings
d)
is never used in the outside world
44.
Css language...
a)
is the language used to create Websites
b)
is the language used to create font sizes and colors
c)
is the coding used to create pictures
d)
is never used in the outside world
45.
Lists are created using which tag?
a)
<a> and <p>
b)
<img> and <p>
c)
<ul>, <ol> and <li>
d)
<thead> and <tbody>
46.
What would the coding look like for a heading written in red?
a)
{ h1 color: red;}
b)
<h1> color; red
c)
h1 { color: green; }
d)
h1 { color: red; }
47.
Using p { background-color: blue; } would....
a)
turn the entire page blue
b)
would turn all of the words in the paragraph blue
c)
turn the background of the paragraph blue
d)
would turn the background of the paragraph black
48.
Which code would you use often when writting a poem?
a)
<img>
b)
<br> 
c)
<a>
d)
<strong>
49.
Which of these codes most likely have many other codes inside of them?
a)
<p>
b)
<em>
c)
<img>
d)
<a>
50.
<a href= "gsotatech.weebly.com"> is a code for?
a)
a heading
b)
your teachers website
c)
the schools website
d)
a paragraph
51.
An image is created with which code?
a)
<img src= "http://www.shiftonelabs.com/blog/wp-content/uploads/2014/11/coding-future.jpg">
b)
<a href= "http://www.shiftonelabs.com/blog/wp-content/uploads/2014/11/coding-future.jpg">
c)
<h5> http://www.shiftonelabs.com/blog/wp-content/uploads/2014/11/coding-future.jpg </h5>
d)
<p> http://www.shiftonelabs.com/blog/wp-content/uploads/2014/11/coding-future.jpg <p>
52.
Which of these codes are used to create a table?
a)
<table> <tr> <a> <p>
b)
<table> <thead> <tr> <th> <tbody>
c)
only <table> can be used
d)
<table> <table1> <table2> <table3>
53.
"ul" element is 
a)
The element inside of which each item in a list is placed
b)
Contains the actual information in the webpage (Not to be confused with an HTML element)
c)
a bulleted list
d)
Is not used
54.
"HTML" element
a)
Contains the actual information in the webpage (Not to be confused with an HTML element)
b)
Contains the address of the image (filename)
c)
Groups other coding elements together
d)
The basic building blocks of web pages, describe each piece of content on a web page
55.
doctype <!DOCTYPE html>
a)
Tells you which type of HTML file you're using, ensures that your webpage displays consistently when being viewed from different browsers
b)
Contains the actual information in the webpage (Not to be confused with an HTML element)
c)
Specifies which HTML elements to style. These include HTML elements, class selectors,
d)
Used to introduce body text on a page, like in an article
56.
href attribute
a)
contains the information the web browser needs to display the page
b)
Sets the font value of an HTML element's text
c)
gives the browser the path to the CSS file used to style the page
d)
These can be used to select the color of an object
57.
"li" element
a)
The element inside of which each item in a list is placed
b)
A bulleted list
c)
The element that nests everything inside a webpage
d)
Contains the actual information in the webpage (Not to be confused with an HTML element)
58.
JavaScript
a)
a programming language used to create pages that respond differently to different user actions
b)
gives the browser the path to the CSS file used to style the page
c)
tells the browser where to find the CSS file used to style the page
d)
These can be used to select the color of an object
59.
Used to introduce body text on a page, like in an article
a)
"A" elements, <a href = "http://quizlet.com/">Quizlet </a>
b)
"IMG" element
c)
h1 element
d)
Paragraph elements, "p" elements, <p>, </p>
60.
Used to add images to a page
a)
"IMG" element
b)
SRC attribute
c)
HTML elements
d)
"ul" element