wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

HTML ASSESSMENT

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.
  1. 1. Which tag is used to insert a line break in HTML?

a)

A) <break>

b)

B) <lb>

c)

C) <br>

d)

D) <line>

2.
  1. 2. What is the correct HTML tag to create a horizontal line?

a)

A) <line>

b)

B) <hr>

c)

C) <hl>

d)

D) <tr>

3.

3. Where do you place the <head> tag in an HTML document?

a)

A) Inside <body>

b)

B) After <title>

c)

C) Before <html>

d)

D) Inside <html> but before <body>

4.

4. What does the <img> tag do?

a)

A) Creates a table

b)

B) Embeds an image

c)

C) Adds video

d)

D) Displays bold text

5.

5. Which attribute is used to specify the image source in <img> tag?

a)

A) link

b)

B) href

c)

C) src

d)

D) imgsrc

6.

6. What is the correct syntax for adding a CSS style tag in HTML?

a)

A) <style css>

b)

B) <css>

c)

C) <script style>

d)

D) <style>

7.

7. Where should the <style> tag be placed in HTML?

a)

A) Inside the <head> section

b)

B) Inside <body>

c)

C) At the end of the document

d)

D) Before the <html> tag

8.

8. Which tag is used to create a table in HTML?

a)

A) <tbl>

b)

B) <tr>

c)

C) <table>

d)

D) <td>

9.

9. Which tag defines a table row?

a)

A) <th>

b)

B) <td>

c)

C) <tr>

d)

D) <table>

10.

10. Which tag defines a table cell (data)?

a)

A) <tr>

b)

B) <td>

c)

C) <table>

d)

D) <th>

11.

11. Which tag is used to define table headings?

a)

A) <head>

b)

B) <th>

c)

C) <td>

d)

D) <heading>

12.

12. Which attribute adds borders to an HTML table?

a)

A) bordercolor

b)

B) table-border

c)

C) border

d)

D) line

13.

13. What value of border shows a table with a single-line border?

a)

A) 1

b)

B) 0

c)

C) true

d)

D) border

14.

14. What is the function of rowspan in HTML tables?

a)

A) Combines columns

b)

B) Repeats row

c)

C) Merges rows vertically

d)

D) Adds color

15.

15. Which HTML tag is self-closing?

a)

A) <div>

b)

B) <img>

c)

C) <p>

d)

D) <h1>

16.

16. What does <br> stand for in HTML?

a)

A) Bold Red

b)

B) Base Row

c)

C) Break

d)

D) Border Row

17.

17. Which tag is used to write CSS code directly inside HTML?

a)

A) <style>

b)

B) <css>

c)

C) <script>

d)

D) <link>

18.

18. What does <hr> tag represent in a webpage?

a)

A) Heading rule

b)

B) Horizontal rule/line

c)

C) Highlight region

d)

D) Hover region

19.

19. Which tag pair should enclose the entire HTML content?

a)

A) <html> ... </html>

b)

B) <head> ... </head>

c)

C) <body> ... </body>

d)

D) <content> ... </content>

20.

20. Which tag adds structure and metadata but not visible content?

a)

A) <body>

b)

B) <div>

c)

C) <head>

d)

D) <span>

21.

1. What will be the output of the following HTML?

<p>Hello<br>World!</p>

a)

A) Hello World!

b)

B) Hello<br>World!

c)

C) Hello
  World!

d)

D) World! Hello

22.

22. What does this code create?

<hr>

a)

A) A heading

b)

B) A horizontal line

c)

C) A new paragraph

d)

D) A table row

23.
  1. 23. What does the following HTML do?

  2. <img src="cat.jpg" width="100">

a)

A) Displays a cat icon

b)

B) Links to a webpage
e

c)

C) Shows a 100-pixel wide image

d)

D) Adds a tabl

24.
  1. 24. What is the correct way to style text color using a <style> tag?

<style>

p {

color: blue;

}

</style>

a)

A) Changes paragraph text to blue

b)

B) Creates a blue border

c)

C) Adds a new paragraph

d)

D) Makes text bold

25.
  1. 25. What will be the result of this table code?

  2. <table border="1">

    <tr>

    <td rowspan="2">A</td>

    <td>B</td>

    </tr>

    <tr>

    <td>C</td>

    </tr>

    </table>

a)

A) 2 rows, each with 2 equal cells

b)

B) Merged columns with A on top

c)

C) A spans two rows; B and C on right

d)

D) A spans two columns; B and C below