wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML/CSS + Python

Total questions: 101

Worksheet time: 2hrs 41mins

Name
Class
Date
1.
What is the difference between an HTML Tag and an HTML element?
a)
An HTML Tag is case sensitive and an HTML element is not case sensitive.
b)
An HTML Tag is always paired and an HTML element is an "empty" tag.
c)
An HTML Tag defines content and an HTML Element includes the opening and closing tags and everything in between.
d)
An HTML Tag defines content and an HTML Element gives additional meaning and content.
2.
Karen wants to begin a new line within a paragraph of text on a webpage. Which code should she use?
a)
<li>
b)
<h1>
c)
<hr>
d)
<br>
3.
Jerry wants to insert a line break into his webpage. Which code should he use?
a)
<ul>
b)
<li>
c)
<br>
d)
<h1>
4.
John wants the name of his book to appear in search results for Google. Where should this information be
placed within his webpage?
a)
head
b)
meta
c)
body
d)
nav
5.
Which item refers to the start tag, the end tag and everything in between?
a)
HTML Element
b)
HTML Tag
c)
HTML Attribute
d)
CSS
6.
What is the proper code to insert an image named "frog.jpg"?
a)
<img src="frog" width="104" height="142">
b)
<img="frog.jpg" width="104" height="142">
c)
<img src="frog.jpg" width="104" height="142">
d)
<img ="frog" width="104" height"142">
7.
The World Wide Web Consortium (W3C) plays which role in the web development standards?
a)
It creates websites accessible to everyone.
b)
It develops the standards for HTML and CSS.
c)
It develops web browsers.
d)
It is the agency that controls the World Wide Web.
8.
Annie wants the name of her product to be the main heading at the top of her webpage. Which tag defines
the main heading in a web document?
a)
<h3>Product</h3>
b)
<h5>Product</h5>
c)
<h1>Product</h1>
d)
<h6>Product</h6>
9.
Which tag defines the visible content of a web document?
a)
<head>
b)
<meta>
c)
<title>
d)
<body>
10.
What tag defines the beginning of a webpage?
a)
<html>
b)
<h1>
c)
<p>
d)
<body>
11.
A properly coded HTML tag will always be found between which two symbols?
a)
( )
b)
{ }
c)
[ ]
d)
< >
12.
Which line of code correctly creates a link to Amazon's website?
a)
<a ref=http://www.amazon.com>Amazon
b)
<href=http://www.amazon.com>Amazon<a>
c)
<a href="http://www.amazon.com">Amazon
d)
<a href="http://www.amazon.com">Amazon</a>
13.
Which of the following is the proper way to code an inline style attribute?
a)
color=blue
b)
color="blue"
c)
color blue
d)
color=(blue)
14.
Which is the correct code to insert a horizontal line in a webpage?
a)
<hr>
b)
<br>
c)
<h1>
d)
<li>
15.
Which item interprets the source code in a web document?
a)
Text editor
b)
Web browser
c)
  HTML editor
d)
Web server
16.
Between which paired tags would the visible content of a webpage be displayed?
a)
<html></html>
b)
<head></head>
c)
<body></body>
d)
<title></title>
17.
Which hyperlink shows an absolute link?
a)
href="www.nytimes.com">NYTimes</a>
b)
<a href="page1.html">Page One<a>
c)
<a href="http://www.target.com">Target<a>
18.

______ is used to create electronic documents (called pages) that are displayed on the World Wide Web. Every web page you see on the Internet is written using one version of _____ code or another.

a)

JPEG

b)

CSS

c)

PDF

d)

HTML

19.

A ___________ is an icon, graphic, or text that links to another file or object. These are what allow web pages to connect to other web pages

a)

hyperlink

b)

HTML Tags

c)

browser

d)

<br>

20.

A __________ is a protection for any published work that helps to prevent that work from being used without prior authorization.

a)

Firewall

b)

HTML

c)

Copyright

d)

CSS Declaration

21.

The _______ _______is used to change the appearance and position of various elements on a web page.

a)

<style> tag

b)

<img> tag

c)

URL link

d)

<p> tag

22.

The ______ ______ is an inline element used to designate a holding space for linked images.

a)

<br> tag

b)

<h1> tag

c)

<img> tag

d)

<ol> tag

23.

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

24.

The ______ ______ is a block element used to designate a list that is bulleted.

a)

<ul> tag

b)

<h2> tag

c)

<hr> tag

d)

<td> tag

25.

RGB

a)

Short for router graphics bitmap, RGB is a process for creating vector graphics.

b)

Short for red, gray, black, RGB is a method of monitoring color on a server website.

c)

Short for random gigabyte burnout, RGB is process used to maintain data on a computer screen.

d)

Short for red, green, blue, RGB is a method of creating colors from the colors of red, green, and blue.

26.

Within an HTML tag, an _________ dictates certain aspects of an element. It is made up of a name and value pair.

a)

attribute

b)

properties

c)

color

d)

class

27.

<h1> to <h6> tags

a)

are styling tags used to designate HTML table attributes.

b)

are line elements for creating different sizes of lines.

c)

are block elements used to designate headings of both different sizes and importance.

d)

are color elements used to style a CSS page.

28.

<p> tag

a)

is a block element used to designate a paragraph.

b)

is an inline element used to create a new page.

c)

is a block element used to post a picture on a web page.

d)

is an inline element used to style with the color purple.

29.

Which is correct CSS syntax?

a)

{body; colour = black;}

b)

body: colour = black

c)

body {

colour : black;}

d)

{body colour is black}

30.

What symbols go around the properties for each CSS selector?

a)

< >

b)

[ ]

c)

{ }

d)

( )

31.
What does CSS stand for? 
a)
Creative Style Sheets
b)
Cascading Style Sheets
c)
Colorful Style Spread
d)
Computer Style Spread
32.
Which is correct CSS syntax? 
a)
{ body; color=black;}
b)
body: color= black
c)
body {color:black;}
d)
(body color is black) 
33.
Select the code below that uses CSS to configure a background color of #000000 for a web page.
a)
body { background-color: #000000; }
b)
body { bgcolor: #000000; }
c)
document { background­-page: #000000; }
d)
None of these
34.
Which is the property in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
35.
You should save HTML files with which file extension?
a)
.htm
b)
.index
c)
.webpage
d)
.html
36.
Name an element which doesn't have a closing tag.
a)
<img>
b)
<head>
c)
<body>
d)
<p>
37.
What HTML element defines the title of the document?
a)
<title>
b)
<head>
c)
<meta>
38.
Which of the following is the largest heading? 
a)
H2
b)
H3
c)
H4
d)
H6
39.
What symbol should precede hexadecimal color codes?
a)
ampersand
b)
semicolon
c)
number sign
d)
equal sign
40.
Which tag is used to underline text?
a)
<a>
b)
<u>
c)
<b>
d)
<I>
41.
to make a comment in HTML you use
a)
<!--  -->
b)
//
c)
/*
d)
#
42.
How do you center text?
a)
text-align: true;
b)
text-align: false;
c)
text-align: center;
d)
text: align center;
43.
What will the output be from the following code?
print("Hello world!\nHello world!")
a)
Hello world! Hello world!
b)
Hello world!
Hello world!
c)
SyntaxError
d)
Hello world!
44.
What is syntax?
a)
Syntax is the word used to describe an error
b)
Syntax is the rules of the programming language
c)
It is used to read information
d)
It is used to output information 
45.
What will the output be from the following code?
print(Hello world!)
a)
Hello world!
b)
SyntaxError
c)
Hello world
d)
print(Hello world!)
46.
What does the term 'debug' mean?
a)
Identify errors and fix them.
b)
Making a calculation
c)
A set of instructions
d)
Looking at code
47.

What syntax can you use to insert a line break between strings so that they appear over new lines?

a)

/

b)

\n

c)

\l

d)

n

48.
What will the output be from the following code?
print("Hello world!" * 2)
a)
TypeError
b)
Hello world world!
c)
Hello world!Hello world!
d)
Hello world! * 2
49.

Which is the best definition of an algorithm?

a)

a line of computer code with input

b)

a process to be followed to solve a problem

c)

a programming language that uses symbols

d)

a description of a future event

50.

Which is the best definition of a variable?

a)

A unit of measurement used in programming

b)

A function used for inputting data

c)

A string that can never change

d)

A stored value with an associated name

51.

What is the correct code to ask for a user’s favourite animal and store it in memory?

a)

animal = input(“What is your favourite animal?”)

b)

input = animal(“What is your favourite animal?”)

c)

animal(“What is your favourite animal?”)

d)

input(What is your favourite animal?)

52.

What would be the output of the following code? - #print(“3 + 5”)

a)

No output

b)

8

c)

3+5

d)

Error message

53.

What would be the output of the following code? - print(“3 + 5”)

a)

No output

b)

8

c)

3+5

d)

Error message

54.

What would be the output of the following code? - print(3 + 5)

a)

No output

b)

8

c)

3+5

d)

Error message

55.

Which of these statements about while loops is true?

a)

While loops always execute the same number of times

b)

While loops always execute at least once

c)

While loops must have a condition

d)

While loops must not contain an “if” statement

56.

12. In Python, True or False is an example of what data type?

a)

string

b)

integer

c)

boolean

d)

float

57.
What is the correct name for a *?
a)
hashtag
b)
star
c)
loop
d)
asterisk
58.
What extension must you add to the end of a file when saving?
a)
.xlsx
b)
.pptx
c)
.docx
d)
.py
59.

If you want to create an empty list called colours in Python, which of the following is correct?

a)

colours = [ ]

b)

colours = ( )

c)

colours = { }

d)

colours = <>

60.
What letter will be printed on the screen after running this code:
a)
e
b)
x
c)
t
d)
Nothing prints
61.
What is the position of the name "Robert" in the following list:
a)
0
b)
1
c)
2
d)
3
62.
What does the APPEND procedure do in the following code:
a)
Adds Liverpool to the beginning of the list
b)
Replaces Bristol with Liverpool
c)
Replaces Manchester with Liverpool
d)
Adds Liverpool to the end of the list
63.
In the following code, "city" is an example of a what?
a)
List
b)
Loop
c)
Variable
d)
Array
64.

Each item in a list has an index. What is the first index in a Python list?

a)

0

b)

1

c)

a

d)

A

65.
print("12"*3)
What would this print?
a)
36
b)
121212
c)
24
d)
12*3
66.
The correct way to write a variable in Python?
a)
my_variable = 10
b)
my variable = 10
c)
my_variable is 10
d)
my_variable: 10
67.

What is the Python built-in function to converts a number to a string?

a)

str()

b)

int()

c)

parseInt()

d)

convert

68.

Look at the following code, what will it generate

a)

1,2,3,4,5,6,7,8,9,10,11,12

b)

0,1,2,3,4,5,6,7,8,9,10,11,12

c)

1,2,3,4,5,6,7,8,9,10,11,12,13

d)

0,1,2,3,4,5,6,7,8,9,10,11,12,13

69.

What does the following program display?

a)

1,2,3,4

b)

1,2,3,4,5

c)

counter,counter,counter,counter,counter

d)

0,1,2,3,4,5

70.
What is the name of the environment in Python that write your programs and then test them out?
a)
Shell
b)
Window
c)
IDLE
d)
CLI
71.
What type of loop is used when you know how many times you want to repeat something?
a)
A WHILE Loop
b)
An IF function
c)
A FOR Loop
d)
A Variable
72.

How many variables are there in this program?

a)

2

b)

3

c)

4

d)

5

73.

What would be the output of this program if the user input was 10?

a)

22.04

b)

220.4

c)

2204

d)

Error wrong data type

74.

What operator is being used in this program?

a)

less than

b)

greater than

c)

less than or equal to

d)

greater than or equal to

75.

What type of list is being used in this example?

a)

Dictionary

b)

List

c)

Tuple

d)

2d Array

76.

What would be the output of this program if the user entered "yes" then "what"?

a)

Enjoy your day

b)

it is too windy for an umbrella

c)

Take an umbrella

d)

Error

77.

Which of the following statements apply to tuples?

a)

They are created using square brackets

b)

They are created using curved brackets

c)

They can be amended when the program is running

d)

They can not be amended when the program is running

78.

What data type represents a whole number?

a)

Float

b)

Int

c)

Boolean

d)

String

79.

Which command used to change the screen size?

a)

window = Tk()

b)

window.mainloop()

c)

window.geometry("400x300")

80.

Which of the following is easy to use from the user?

a)

Command Line

b)

GUI (Graphical User Interface)

81.

__________ is an element of GUI.

a)

Widget

b)

GUI

c)

Application

82.

Which is the correct way to use tkinter in python

program?

a)

include tkinter *

b)

import tkinter *

c)

from tkinter import *

d)

from tkinter include *

83.

Which of the following attribute used to change the text

color of a Label widget in python tkinter

a)

fg

b)

foreground

c)

bg

d)

background

84.

Which of the following attribute used to change the

background color of a Label widget in python tkinter

a)

background

b)

bg

c)

fg

d)

foreground

85.

What is the full form of GUI?

a)

Graphic Unit Interface

b)

Graphical User Interface

c)

Graphic Unit Input

86.

______________ library provides fast and easy way to create GUI applications in Python.

a)

Tkinter

b)

IbtikarMaker

c)

Graph

87.

Choose the correct statement to display title.

a)

window.title("My First Program")

b)

window.title(My First Program)

c)

window.title "My First Program"

88.

Label , Button , Sliders are all examples of Widgets.

a)

True

b)

False

89.

Which function is used to set the size of the tkinter

window?

a)

setsize()

b)

size()

c)

geometry()

d)

dimension()

90.

What is tkinter?

a)

A Python GUI module

b)

A Python Scripting module

91.

Whats the correct boolean type:

a)

x == 5

b)

x = 5

c)

x = condition(True)

d)

x = True

e)

x == True

92.

what is the following:

x = [3, 5, 7, 10, 9]

a)

A boolean

b)

A tuple

c)

A list

d)

A string

93.

How many times will the following code execute:

i = 0

while i <= 10:

print(i)

i += i

a)

Infinity

b)

None because <= isnt valid

c)

10

d)

9

94.

In the below function how is the the thing inside the brackets called:

def handle_turn(current_turn):

a)

Parameter

b)

Condition

c)

Info

d)

Def info

e)

String

95.

in:

import random

whats random?

a)

function

b)

module

c)

External_function

d)

External_module

e)

I.E (Importable Element)

96.

What will the below line of code print?

print(3**2)

a)

9

b)

12

c)

10

d)

5

97.

This is a picture of a ____.

a)

CSS Rule

b)

HTML Rule

c)

Tags

d)

Coding

98.

The blue is called an _____________

a)

Declaration

b)

Selector

c)

Property

d)

Value

99.

The blue is called an _____________

a)

Declaration

b)

Selector

c)

Property

d)

Value

100.

The blue is called an _____________

a)

Declaration

b)

Selector

c)

Property

d)

Value

101.
If you want to have more than one property for a CSS selector, what character separates them?
a)
comma (,)
b)
semi-colon (;)
c)
colon (:)
d)
dash (-)