NEW
Font size
WorksheetsHTML Quiz
Total questions: 30
Worksheet time: 15mins
Which of the following is a self-closing tag in HTML?
<div>
<p>
<img>
<section>
Which HTML5 element is used to specify a header for a document or section?
<h1>
<header>
<section>
<footer>
What does the `data-*` attribute in HTML5 do?
Stores custom data private to the page or application
Links to a database
Creates a form field
Defines a data type
Which of the following HTML elements is used to define emphasized text?
<strong>
<em>
<b>
<i>
Which HTML element is used to define important text?
<em>
<strong>
<b>
<mark>
How do you create a multi-line text input field in HTML?
<textarea>
<input type="text" multiline>
<input type="textarea">
<text>
Which attribute is used to define inline styles in an HTML element?
class
style
id
inline
Which of the following is not a valid HTML5 input type?
color
date
range
Which tag is used to define a standard cell in an HTML table?
<th>
<td>
<tr>
<table>
Which attribute in the `` tag is used to send form data to a server?
method
action
enctype
target
What is the correct way to comment out text in HTML?
<!-- Comment -->
// Comment
/* Comment */
# Comment
Which element is used to define the title of a document, which appears on the browser tab?
<head>
<meta>
<title>
<link>
What does the `target="_blank"` attribute do in an anchor tag?
Opens the link in a new window or tab
Opens the link in the same window
Displays the link in a blank page
Refreshes the current page
Which element is used to group elements for styling purposes in HTML?
<section>
<div>
<span>
<article>
Which tag is used to define a drop-down list in an HTML form?
<input>
<select>
<textarea>
<button>
How do you specify that an input field must be filled out before submitting the form?
mandatory
validate
required
needed
Which tag is used to define a clickable button in an HTML form?
<input type="button">
<input type="submit">
<button>
<input type="click">
Which HTML attribute is used to define the relationship between a linked document and the current document?
link
rel
href
type
Which attribute is used to specify an alternate text for an image, if the image cannot be displayed?
src
alt
title
text
What is the purpose of the `` tag in HTML5?
To represent a figure, like an image with a caption
To create a numbered list
To display mathematical calculations
To define a footer for a document
Which attribute is used with the `` tag to open a hyperlink in a new window/tab?
href
target
link
rel
Which tag is used to define an unordered list?
<ul>
<ol>
<li>
<dl>
Which tag would you use to insert a line break in HTML?
<lb>
<br>
<break>
<line>
Which tag is used to define a container for external interactive content or plugins in HTML5?
<embed>
<iframe>
<object>
All of the above
What is the purpose of the `` element in HTML5?
To display the current time
To define a specific time (e.g., 20:00)
To represent a date and/or time
To measure the duration of a process
Which HTML attribute is used to specify that an input field should have autocomplete enabled?
autocomplete
autocompletion
auto
autofill
Which tag is used to define a description list in HTML?
<ul>
<ol>
<dl>
<list>
What is the correct HTML tag for creating a checkbox?
<checkbox>
<input type="checkbox">
<input type="check">
<check>
Which element is used to define navigation links in HTML5?
<navigation>
<nav>
<navbar>
<links>
Which HTML5 element is used to embed video files?
<video>
<movie>
<media>
<embed>
