Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML Image and Table Attributes Quiz

Total questions: 33

Worksheet time: 17mins

Name
Class
Date
1.

Which attribute of the tag specifies the path of the image file?

a)

href

b)

src

c)

link

d)

path

2.

Which attribute of the tag is used to display text if the image is not available?

a)

alt

b)

title

c)

name

d)

text

3.

What is the correct syntax to insert an image in HTML?

a)

<img source="image.jpg">

b)

<image src="image.jpg">

c)

<img src="image.jpg">

d)

<src img="image.jpg">

4.

Which attribute is used to define the height of an image in HTML?

a)

height

b)

size

c)

length

d)

hgt

5.

The attribute used to define the width of an image is:

a)

length

b)

width

c)

size

d)

wdt

6.

Which tag is used to create a hyperlink in HTML?

a)

<h>

b)

<a>

c)

<link>

d)

<href>

7.

What is the correct attribute to specify the URL in a hyperlink?

a)

link

b)

url

c)

href

d)

src

8.

Which of the following creates a link to "https://www.google.com"?

9.

Which tag is used to create scrolling text in HTML?

a)

Marquee

b)

Move

c)

Animate

d)

Run

10.

Which attribute defines the scroll direction in a marquee?

a)

flow

b)

scroll

c)

direction

d)

move

11.

The default scroll direction of a marquee is:

a)

up

b)

down

c)

left

d)

right

12.

Which marquee attribute specifies the speed of scrolling?

a)

scrollamount

b)

speed

c)

movement

d)

velocity

13.

Which tag is used to insert a horizontal line in a web page?

a)

Line

b)


HR

c)

HorizontalLine

d)

Segment

14.

Which attribute of line tag


is used to define its thickness?

a)

size

b)

height

c)

width

d)

border

15.

To set the color of a horizontal rule, which attribute is used?

a)

bgcolor

b)

color

c)

bordercolor

d)

hrcolor

16.

The HR


tag in HTML is:

a)

a container tag

b)

a paired tag

c)

an empty tag

d)

a comment tag

17.

Which attribute sets the length of a horizontal rule?

a)

width

b)

length

c)

size

d)

align

18.

Which tag is used to create a table in HTML?

a)

<T>

b)

<Table>

c)

<GRID>

d)

<TABLEGRID>

19.

Which tag is used to define a row in a table?

a)

<ROW>

b)

<TableROW>

c)

<TR>

d)

<RT>

20.

Which tag is used to define a cell in a table?

a)

tr

b)

td

c)

table

d)

colspan

21.

Which tag is used for a table header cell?

a)

tr

b)

td

c)

th

d)

table

22.

Which attribute specifies the border thickness of a table?

a)

frame

b)

thickness

c)

border

d)

edge

23.

To merge two or more columns in a table cell, which attribute is used?

a)

rowspan

b)

colspan

c)

merge

d)

span

24.

To merge rows in a table cell, we use:

a)

rowspan

b)

colspan

c)

merge

d)

rowspancol

25.

Which attribute of table tag sets the distance between cell contents and cell walls?

a)

cellspacing

b)

cellpadding

c)

border

d)

margin

26.

Which attribute sets the space between table cells?

a)

cellspacing

b)

cellpadding

c)

spacing

d)

margin

27.

Which attribute aligns the table to the center of the page?

a)

align

b)

valign

c)

position

d)

center

28.

What is the default alignment of content in <TD> tag?

a)

left

b)

center

c)

right

d)

justify

29.

What is the default alignment of content in <TH> tag?

a)

left

b)

center

c)

right

d)

justify

30.

Which attribute defines background color in a table cell?

a)

bgcolor

b)

color

c)

background

d)

cellcolor

31.

To create a hyperlink on an image, which is correct?

a)

<img href="page.html" src="image.jpg">

b)

<a src="image.jpg" href="page.html">

c)

) <a href="page.html"><img src="image.jpg"></a>

d)

<link src="image.jpg" to="page.html">

32.

Which attribute of marquee makes the text bounce back and forth?

a)

behavior="alternate"

b)

direction="up"

c)

scroll="bounce"

d)

type="repeat"

33.

Which attribute


aligns the line to left, center, or right?

a)

position

b)

valign

c)

align

d)

float