WorksheetsMastering HTML5 and CSS3 Concepts
Total questions: 15
Worksheet time: 8mins
What is the purpose of the
The
The
The
The
Which HTML5 element is used to define navigation links?
What does the
A section of a webpage that contains navigation links.
A placeholder for images and multimedia content.
A container for styling elements with CSS.
A self-contained composition in a document, such as a blog post or news article.
How do you create a responsive layout using CSS3 Flexbox?
Set display: block on the container and use margin for spacing.
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.
Apply float properties to elements for responsiveness.
Use CSS Grid instead of Flexbox for all layouts.
What property is used to align items in a Flexbox container?
align-items
flex-direction
justify-content
flex-wrap
Which CSS property controls the spacing between flex items?
border
padding
margin
gap
What is the function of the
The
The
The
The
How can you ensure a text input field is required in an HTML5 form?
Set the type to 'text' for required fields.
Use JavaScript to validate the input field.
Add the 'optional' attribute to the element.
Add the 'required' attribute to the element.
What attribute is used to specify a pattern for input validation in HTML5?
regex
validate
check
pattern
How do you create a multi-column layout using Flexbox?
Set display: grid; and grid-template-columns: auto; on the container.
Use float: left; on child items to create columns.
Set display: flex; and flex-wrap: wrap; on the container, then define width for child items.
Apply margin: auto; to the container for spacing.
What is the difference between 'flex-start' and 'flex-end' in Flexbox?
'flex-start' aligns items to the bottom of the container, while 'flex-end' aligns them to the top.
'flex-start' and 'flex-end' are interchangeable and produce the same alignment effect.
'flex-start' aligns items at the start of the container, while 'flex-end' aligns them at the end.
'flex-start' centers items in the container, while 'flex-end' pushes them to the left.
Which HTML5 element is used to group related form controls?
label
fieldset
input
select
How can you validate an email input in an HTML5 form?
Require a phone number instead of an email address.
Validate the email using JavaScript only.
Use in the HTML5 form.
Use in the HTML5 form.
What is the purpose of the
The
The
The
The
How do you center a flex container both vertically and horizontally?
Set display: grid; justify-content: space-between; align-items: stretch;
Set display: flex; justify-content: center; align-items: center;
Set display: block; justify-content: flex-start; align-items: flex-start;
Set display: inline; justify-content: center; align-items: baseline;
