wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Html css training

Total questions: 30

Worksheet time: 19mins

Name
Class
Date
1.

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

a)

<src>

b)

classes:ids

c)

id="title"

d)

<id>

2.

Which tag is used to add an image?

a)

<image>

b)

<img>

c)

<<img>>

d)

</image>

3.

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

a)

.

b)

+

c)

id

d)

#

4.

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

a)

#

b)

()

c)

.

d)

class

5.
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.
6.
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>
7.
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">
8.
What tag defines the beginning of a webpage?
a)
<html>
b)
<h1>
c)
<p>
d)
<body>
9.
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>
10.
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
11.
All Tags are HTML mandatory requires a closing tag?
a)
true
b)
false
12.
which property is used to add space around the content and border?
a)
margin
b)
span
c)
padding
d)
position
13.
How to change the below code to inline CSS code <p><font color = "green" size = "5">Hello, World!</font></p>
a)
<p style = "font-color:green; font-size:24px;" >Hello, World!</p>
b)
<p style = "color:green; font-size:24px;" >Hello, World!</p>
c)
<p style = "font color:green, size:24px;" >Hello, World!</p>
d)
<p style = "color:green; size:24px;" >Hello, World!</p>
14.
How do we comment a statement in CSS?
a)
By using //
b)
By using /* */
c)
By using //* *//
d)
None of the above
15.

Which of the below options is correct to change the background color to blue in CSS?

a)

body {

background-colour: lightblue;

}

b)

body {

background-color: lightblue;

}

c)

body {

background:color: lightblue;

}

d)

None of the above

16.
What is the extension of Stylesheet files?
a)
.style
b)
.ss
c)
.css
d)
.cst
17.
How to change the below code to inline CSS code <p><font color = "green" size = "5">Hello, World!</font></p>
a)
<p style = "font-color:green; font-size:24px;" >Hello, World!</p>
b)
<p style = "color:green; font-size:24px;" >Hello, World!</p>
c)
<p style = "font color:green, size:24px;" >Hello, World!</p>
d)
<p style = "color:green; size:24px;" >Hello, World!</p>
18.
Which tag is used to make a list of un ordered grocery list
a)
<OL>
b)
<UL>
c)
<DT>
d)
<DD>
19.

How many heading tags are there in HTML5?

a)

2

b)

5

c)

7

d)

6

20.

In CSS, how do you select an element with the class "btn1"?

a)

#btn1

b)

.btn1

c)

{btn1}

d)

=btn1

21.
Which of the following property of declaration is used to represent text color of <H1> tag
a)
H1{color:red}
b)
H1{font-color:red}
c)
H1{foregroundcolor:red}
d)
H1{fontcolor:red}
22.

The <title> element must be located inside

a)
body
b)
head
c)
nav
d)
footer
23.

How to make a text italic?

a)

  • <em>Some text.</em>

b)

  • <italic>Some text.</italic>

c)

  • <i>Some text.</i>

24.

What is the HTML form input used to send information of the form to the server?

a)

  • <input type="server">

b)

  • <input type="submit">

c)

  • <input type="send">

d)

  • <input type="del">

25.

Select block-level tags.

a)

<div>

b)

<p>

c)

<span>

d)

<i>

26.


Select inline elements.

a)

<span>

b)

<i>

c)

<p>

d)

<div>

27.

What does HTML stand for?

a)
HyperText Markup Language
b)
Hypnotic Text Manipulation
c)
Highly Technical Markup Language
d)
Hyperlink Text Management
28.

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

a)
self-closing tag
b)
solo tag
c)
lonely tag
d)
empty tag
29.

The <br> tag is used to add

a)
Line breaks in the content
b)
Changing font size
c)
Adding images to the content
d)
Creating hyperlinks
30.

Which HTML tag is used to create a clickable hyperlink?

a)

<a>

b)

<link>

c)

<href>

d)

<web>