wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML-CSS

Total questions: 114

Worksheet time: 21mins

Name
Class
Date
1.

HTML is what type of language ?

a)

Scripting Language

b)

Markup Language

c)

Network Protocol

d)

Programming Language

2.

Apart from <b> tag, what other tag makes text bold ?

a)

<fat>

b)

<emp>

c)

<black>

d)

<strong>

3.

What tag is used to display a picture in a HTML page?

a)

picture

b)

src

c)

img

d)

image

4.

Which HTML tag produces the biggest heading?

a)

<h7>

b)

<h5>

c)

<h3>

d)

<h1>

5.

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

6.

TRUE OR FALSE: HTML is used to style web pages.

a)

True

b)

False

7.

What is missing from this HTML skeleton?


<!DOCTYPE html>

<html>

<body>

</body>

</html>

a)

<head></head>

b)

<div></div>

c)

<img></img>

d)

<head>

8.

TRUE OR FALSE: CSS is used to style web pages

a)

True

b)

False

9.
Jerry wants to insert a line break into his webpage. Which code should he use?
a)
<ul>
b)
<li>
c)
<br>
d)
<h1>
10.
When using a text editor, what file extension(s) must be used when saving as a web document?
a)
txt
b)
html or htm
c)
doc
d)
css
11.
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)
12.

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>

13.
<!DOCTYPE> 
a)
Defines the document type
b)
Defines a comment
c)
Defines the document's body
d)
Defines information about the document
14.
Defines a paragraph
a)
<pr>
b)
<p>
c)
<para>
d)
<par>
15.
Google Chrome, Mozilla Firefox and Microsoft Edge are all examples of what?
a)
Search engines
b)
Websites
c)
Web Browsers
d)
Text editors
16.
Which is the correct HTML element for underlining text?
a)
<ul>
b)
<uline>
c)
<u>
d)
<under>
17.

What is the correct way to write a comment in HTML?

a)

/* comment */

b)

<!– comment –>

c)

ctrl + Ç

d)

<¡– comment –>

18.

What is the correct way to write a link in HTML?

a)

<link href=”#”>…<link>

b)

<a title=”#”>…</>

c)

<a src=”#”>…</a>

d)

<a href=”#”>…</a>

19.

What does CSS mean?

a)

Cascading Style Sheets

b)

Center Style Steels

c)

Calibre Style Sheet

d)

No answer is correct

20.

What is the correct order of the opening tags for a basic web structure?

a)

<body>, <head>, <html>

b)

<html>, <body>, <head>

c)

<html>, <head>, <body>

d)

<head>, <body>, <html>

21.
</h> is
a)
Header Tag
b)
Headline Tag
c)
Half of a tag
d)
Closing header tag
22.

td

a)

one cell in a header

b)

one column of a row

c)

one row of a column

d)

one data cell in a row

23.
The ......... .......... is the first page of the Web site. This page usually tells visitors what the site is about.
a)
home page
b)
main section
c)
subsections
d)
page
24.

Which tag does not need a closing tag?

a)

<a href>

b)

<head>

c)

<body>

d)

<img src>

25.
Which is NOT a web browser?
a)
Chrome
b)
Internet explorer
c)
FireFox
d)
Yahoo
26.
How would you centre a H2 heading?
a)
<h1 align="center">
b)
<h2 stickit="center">
c)
<h2 align=center>
d)
<h2 align="center">
27.

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

a)

a table row

b)

a table column

c)

a table header

d)

Thanos

28.

sets the color of words in a paragraph

a)

h1 {

color: pink;

}

b)

img {

color: pink;

}

c)

body {

color: pink;

}

d)

p {

color: pink;

}

29.

What does a class do?

a)

adds color to words

b)

adds style to specific elements

c)

adds style to a whole page

d)

adds a lot more work

30.

Which rule set would change the font size to 24?

a)

font-size: 24

b)

size: 24;

c)

font-size: 24;

d)

font size: 24;

31.

Which is correct CSS syntax?

a)

{body; colour = black;}

b)

body: colour = black

c)

body {

colour : black;}

d)

{body colour is black}

32.

Select the tags below:

a)

<body>

b)

/body

c)

<p>

d)

img

33.

What language is used to define the structure of a webpage?

a)

HTML

b)

JavaScript

c)

CSS

d)

French

34.

What language is used to add style to a webpage?

a)

HTML

b)

JavaScript

c)

CSS

d)

French

35.

What tag do you use to create a numbered list?

a)

<list>

b)

<ol>

c)

<li>

d)

<ul>

36.

Which sets the colour of words in a paragraph

a)

h1 {

colour: pink }

b)

img {

colour: pink }

c)

p {

colour: pink }

d)

p {

color: pink }

37.

Select the rule to make all the text in your web page blue and centered.

a)

p {

colour: blue; }

b)

body {

text-align: left;

colour: blue; }

c)

p {

text-align: center

color: blue; }

d)

body {

text-align: center

color: blue; }

38.

What is the selector for a link?

a)

a { }

b)

link { }

c)

href { }

d)

a href { }

39.

Annie wants the name of her product to be the main heading at the top of her webpage. Which tage defines the main heading in a web documnets?

a)

<h3>Product<h3>

b)

<h5>Product<h5>

c)

<h1>Product<h1>

d)

<h6>Product<h6>

40.

Name an element which does not have a closing tag.

a)

<img>

b)

<head>

c)

<body>

d)

<p>

41.

What symbol should you use to target an id in css?

a)

.

b)

+

c)

id

d)

#

42.

What is the HTML tag that creates a heading cell in a table?

4 lines
43.

Write an appropriate CSS selector that enables CSS rule to be applied on both paragraphs and images.

4 lines
44.

What is the type of element that does not start on a new line and it only takes up as much width as necessary.

4 lines
45.

Write an appropriate HTML code that will insert/display an image called "Bahrain.png" in a webpage.

4 lines
46.

Which type of CSS style posses the highest priority?

4 lines
47.

What does HTML stand for??

a)

Home Training Metric Length

b)

Homogenous Technical Support

c)

Hype Tense Microsoft Level

d)

Hyper Text Markup Language

48.

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

a)

<!DOCTYPE html>

<html>

<head>

</head>

<body>

</body>

</html>

b)

<html>

<head>

</head>

<body>

</body>

</html>

c)

<!DOCTYPE html>

<html>

<head>

</head>

</html>

d)

<!DOCTYPE html>

<html>

<head>

</head>

<body>

</body>

49.

Which of the tag is used to create a numbered list?

a)

<L> </L>

b)

<LI> </LI>

c)

<li> </lo>

d)

<ol> </ol>

50.

Choose the correct HTML element for the largest heading:

a)

<head>

b)

<h1>

c)

<heading>

d)

<h6>

51.

HTML controls the _________ of a webpage.

a)

feel

b)

precision

c)

structure

d)

style

52.

<p> is the opening tag for a _____________

a)

page

b)

paragraph

c)

preorder

d)

period

53.

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>

54.

Which of the following codes would create a horizontal line

a)

<br>

b)

<h1></h1>

c)

<hr>

d)

<p>

55.

You need a closing tag for an image without text

a)

True

b)

False

56.
HTML Language uses
a)
Tabs
b)
Tags
c)
Punctuation
d)
Quotations
57.
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
58.
<img> tag finds;
a)
finds the image located at the a URL and the src attribute and then displays it.
b)
finds the image located at the SRC in the URL attribute and then displays it.
c)
Adds a cool picture
d)
Does not work in HTML coding
59.

The select field in a form

a)

is used inside an input element.

b)

provides users with a set of options to choose from.

c)

auto-completes as the user types data.

d)

cannot have a default option setting.

60.

To help users know what to put in field, use

a)

<input name="firstname">

b)

<label for="firstname">

<input type="text" id="firstname>

c)

<input type="text" id="firstname" name="label">

d)

<input label="First Name" type="text">

61.

Which of the following is the correct way to add an attribute?

a)

<src>

b)

classes:ids

c)

id="title"

d)

<id>

62.

What is missing from this HTML skeleton?


<!DOCTYPE html>

<html>

<body>

</body>

</html>

a)

<head></head>

b)

<div></div>

c)

<img></img>

d)

<head>

63.

How do you change the font color with CSS?

a)

font-color: green;

b)

color: green;

c)

change-font-color: green;

d)

fontcolor=green;

64.

What symbol should you use to target an id in css?

a)

.

b)

+

c)

id

d)

#

65.

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

66.

What tag do you use to make a numbered list?

a)

<list>

b)

<ol>

c)

<li>

d)

<ul>

67.

To Write A HTML File, which tag will we use?

a)

<<html>>

b)

<html>

c)

<!html>

d)

<--!html-->

68.

TRUE OR FALSE: HTML is used to add content to web pages.

a)

True

b)

False

69.

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

70.

Which tag is used to add an image?

a)

<image>

b)

<img>

c)

<<img>>

d)

</image>

71.

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.

72.

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>

73.
What does CSS stand for? 
a)
Creative Style Sheets
b)
Cascading Style Sheets
c)
Colorful Style Spread
d)
Computer Style Spread
74.
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
75.
What symbols go around the properties for each CSS selector?
a)
< >
b)
[ ]
c)
{ }
d)
( )
76.
Which is the value in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
77.
Which is the selector for a link?
a)
a { }
b)
link { }
c)
href { }
d)
a href { }
78.
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.
79.
Which is correct CSS syntax? 
a)
{ body; color=black;}
b)
body: color= black
c)
body {color:black;}
d)
(body color is black) 
80.
How can you make a bulleted list?
a)
<ol>
b)
<ul>
c)
<list>
d)
<dl>
81.
What is this an example of?
/* This is a multi-line comment */
a)
Syntax
b)
Property 
c)
Value
d)
Comment
82.
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 (-)
83.
Which is the selector in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
84.
________ positioning keeps the element in the normal document flow, while ________ positioning takes it out of the normal flow.
a)
relative, absolute
b)
absolute, relative
c)
fixed, static
d)
parallel, universal
85.

What does HTML stand for?

a)

HyperText Multi Language

b)

HighText Markup Language

c)

HyperText Markup List

d)

HyperText Markup Language

86.

Which tag is used to create a hyperlink in HTML?

a)

a

b)

link

c)

meta

d)

src

87.

What is the purpose of the main tag in an HTML document?

a)

The tag contains the visible text for users.

b)

The tag is used to display the main content of the page.

c)

The tag is for defining the layout of the webpage.

d)

The tag is used to contain meta-information about the HTML document.

88.

Which HTML element is used to define an unordered list?

a)

ol

b)

dl

c)

  • ul

d)

  1. al

89.

What is the correct HTML element for inserting a line break?

a)

br

b)

hr

c)

ar

d)


lb

90.

Which attribute is used to specify the destination of a link?

a)

src

b)

link

c)

href

d)

target

91.

What does CSS stand for?

a)

Cascading Style Sheets

b)

Creative Style Sheets

c)

Cascading Style System

d)

Computer Style Sheets

92.

Which CSS property is used to change the text color?

a)

color

b)

text-color

c)

background-color

d)

font-color

93.

What is the syntax for selecting an element with a class in CSS?

a)

.className

b)

class .className

c)

className()

d)

#className

94.

What is the purpose of the input element in HTML?

a)

The

element is used to create tables.

b)

The element is used to collect user input.

c)

The element is for styling web pages.

d)

The element is used to display images.

95.

Which input type is used for a password field in HTML forms?

a)

email

b)

text

c)

password

d)

number

96.

What is the difference between "p"

and "span" in HTML?

a)

is a block-level element, is an inline element.

b)

is an inline element, is a block-level element.

c)

can contain only text, can contain any HTML element.

d)

is used for styling, is used for scripting.

97.

What does semantic HTML mean?

a)

Semantic HTML is HTML that is only used for styling.

b)

Semantic HTML is a programming language for web development.

c)

Semantic HTML is HTML that uses meaningful tags to describe the content.

d)

Semantic HTML is HTML that only uses div tags.

98.

Which HTML element is used to define a table?

a)

excel

b)

table

c)

group

d)

tab

99.

What is the purpose of the

a)

To create a new form input element.

b)

To style the form input elements.

c)

To associate a text label with a form input element.

d)

To validate the form input data.

100.

How do you apply an external CSS stylesheet to an HTML document?

a)

using link element

b)

style tag

c)

styles.css

d)

html styles

101.

What is the default display value of 'a' element?

a)

inline

b)

block

c)

grid

d)

flex

102.

Which CSS property is used to set the spacing between elements?

a)

padding

b)

display

c)

margin

d)

border

103.

What is the purpose of the tag in the section?

a)

To define the style of the document.

b)

To link external CSS files.

c)

To provide metadata about the HTML document.

d)

To specify the title of the document.

104.

Which HTML element is used to define a form?

a)

fieldset

b)

input

c)

section

d)

form

105.

How is document type initialized in HTML5?

a)

</DOCTYPE HTML>

b)

</DOCTYPE>

c)

<!DOCTYPE HTML>

d)

</DOCTYPE html>

106.

Which of the following HTML Elements is used for making any text bold ?

a)

<p>

b)

<li>

c)

  • <i>

d)

<b>

107.

Which of the following HTML element is used for creating an unordered list?

a)

<ui>

b)

<i>

c)

<em>

d)

  • <ul>

108.

What is an element that does not have a closing tag called?

a)

Tag

b)

Empty element

c)

Closed element

109.

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

a)

a table row

b)

a table column

c)

a table header

d)

unordered list

110.

What does CSS stand for?

a)

Creative Style Sheets

b)

Cascading Style Sheets

c)

Colorful Style Spread

d)

Computer Style Spread

111.

Which class provides a responsive fixed width container?

a)

.container-fixed

b)

.container

c)

.container-fluid

d)

None of above

112.

Bootstrap is mobile first.

a)

True

b)

False

c)

Maybe

d)

Some may agree

113.

How do you write "Hello World" in an alert box?

a)

msg("Hello World");

b)

alertBox("Hello World");

c)

alert("Hello World");

d)

msgBox("Hello World");

114.
  1. The ____________ are used to create space around elements, outside of any defined borders.

a)

Margin

b)

Padding

c)

Border

d)

Border Model