wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

HTML and CSS Mastery

Total questions: 30

Worksheet time: 15mins

Name
Class
Date
1.

What is the purpose of semantic elements in HTML?

a)

To create interactive elements with JavaScript

b)

To style the content with CSS

c)

To define the layout of the webpage

d)

The purpose of semantic elements in HTML is to give meaning to the content, enhancing accessibility and search engine optimization.

2.

Which HTML element is used to define navigation links?

a)

b)

c)

d)

3.

What does the

element represent in a webpage?

a)

The

element represents the introductory content or navigational links of a webpage.

b)

The

element contains the footer information of a webpage.

c)

The

element is responsible for the styling of a webpage.

d)

The

element is used for the main content of a webpage.

4.

Which element is used to create a footer in HTML?

a)

b)

c)

d)

5.

What is the role of the

element?

a)

The

element is for embedding images in a webpage.

b)

The

element defines the header of a document.

c)

The

element represents a self-contained composition in a document.

d)

The

element is used for styling text.

6.

How do you create a form in HTML?

a)

HTML does not support forms at all.

b)

Use the

tag with input elements to create a form in HTML.

c)

Use the tag alone to create a form in HTML.

d)

Forms can only be created using JavaScript.

7.

What attribute is used to specify the action of a form?

a)

enctype

b)

action

c)

target

d)

method

8.

Which input type is used for entering a password?

a)

number

b)

password

c)

email

d)

text

9.

What is the purpose of the

a)

To specify the data type of the input fields.

b)

To define the layout of the form elements.

c)

To improve accessibility and usability by associating a label with a form input.

d)

To create a visual style for the form inputs.

10.

How can you create a dropdown list in HTML?

a)

Use and ?

a)

is used for numeric input only.

b)

Both inputs require the same validation rules.

c)

The main difference is that validates the input as an email address, while does not.

d)

can accept any text input.

14.

How do you create a checkbox input in HTML?

a)

b)

c)

d)

15.

What is the purpose of the

element in forms?

a)

To validate form inputs before submission.

b)

To style the form elements with CSS.

c)

To create a new form element type.

d)

To group related form elements for better organization and accessibility.

16.

What is the function of the

element in a webpage?

a)

The

element represents the closing content or information about the author of a webpage.

b)

The

element contains the main content of a webpage.

c)

The

element is used to define the header of a webpage.

d)

The

element is responsible for styling the webpage.

17.

Which attribute is used to specify the method of form submission?

a)

type

b)

action

c)

method

d)

submit

18.

How can you create a checkbox in HTML?

a)

Use and

b)

Use to create a checkbox.

c)

Implement a tag with elements for checkbox functionality.

d)

Utilize

and tags to make a checkbox selection.

19.

What is the purpose of the element?

a)

To create a text input field.

b)

To allow users to select multiple options at once.

c)

To display images in a form.

d)

To enable users to select a single option from a set of choices.

20.

Which element is used to create a button in HTML forms?

a)

submit

b)

button

c)

input type='button'

d)

Both

button

and

input type='button'

are correct.

21.

What does the