wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Mastering HTML5 and CSS3 Concepts

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What is the purpose of the

element in HTML5?

a)

The

element is used to define the main content of a webpage.

b)

The

element is used to include scripts and styles in an HTML document.

c)

The

element is used to define a header for a document or section.

d)

The

element is used to create a footer for a document or section.

2.

Which HTML5 element is used to define navigation links?

a)

b)

c)

d)

3.

What does the

element represent in HTML5?

a)

A section of a webpage that contains navigation links.

b)

A placeholder for images and multimedia content.

c)

A container for styling elements with CSS.

d)

A self-contained composition in a document, such as a blog post or news article.

4.

How do you create a responsive layout using CSS3 Flexbox?

a)

Set display: block on the container and use margin for spacing.

b)

Use CSS3 Flexbox by setting display: flex on the container and adjusting properties like flex-direction, flex-wrap, justify-content, and align-items for responsiveness.

c)

Apply float properties to elements for responsiveness.

d)

Use CSS Grid instead of Flexbox for all layouts.

5.

What property is used to align items in a Flexbox container?

a)

align-items

b)

flex-direction

c)

justify-content

d)

flex-wrap

6.

Which CSS property controls the spacing between flex items?

a)

border

b)

padding

c)

margin

d)

gap

7.

What is the function of the

element in HTML5?

a)

The element is used to display images on a webpage.

b)

The element is used to collect user input and submit it to a server.

c)

The element is for creating tables in HTML.

d)

The element is used to style text with CSS.

8.

How can you ensure a text input field is required in an HTML5 form?

a)

Set the type to 'text' for required fields.

b)

Use JavaScript to validate the input field.

c)

Add the 'optional' attribute to the element.

d)

Add the 'required' attribute to the element.

9.

What attribute is used to specify a pattern for input validation in HTML5?

a)

regex

b)

validate

c)

check

d)

pattern

10.

How do you create a multi-column layout using Flexbox?

a)

Set display: grid; and grid-template-columns: auto; on the container.

b)

Use float: left; on child items to create columns.

c)

Set display: flex; and flex-wrap: wrap; on the container, then define width for child items.

d)

Apply margin: auto; to the container for spacing.

11.

What is the difference between 'flex-start' and 'flex-end' in Flexbox?

a)

'flex-start' aligns items to the bottom of the container, while 'flex-end' aligns them to the top.

b)

'flex-start' and 'flex-end' are interchangeable and produce the same alignment effect.

c)

'flex-start' aligns items at the start of the container, while 'flex-end' aligns them at the end.

d)

'flex-start' centers items in the container, while 'flex-end' pushes them to the left.

12.

Which HTML5 element is used to group related form controls?

a)

label

b)

fieldset

c)

input

d)

select

13.

How can you validate an email input in an HTML5 form?

a)

Require a phone number instead of an email address.

b)

Validate the email using JavaScript only.

c)

Use in the HTML5 form.

d)

Use in the HTML5 form.

14.

What is the purpose of the

element in HTML5?

a)

The

element is used to create a navigation menu.

b)

The

element is used to define the main content of a webpage.

c)

The

element is for embedding multimedia content.

d)

The

element is used to represent the footer of a document or section.

15.

How do you center a flex container both vertically and horizontally?

a)

Set display: grid; justify-content: space-between; align-items: stretch;

b)

Set display: flex; justify-content: center; align-items: center;

c)

Set display: block; justify-content: flex-start; align-items: flex-start;

d)

Set display: inline; justify-content: center; align-items: baseline;