HTML Tags and Attributes Quiz
Want to learn more than this quiz offers you? Have a look at my Frontend web
development courses.
Create an account and save your quiz results
Login and save your results
OR
Question 1/15
Which HTML tag is used to define an internal style sheet?
Select your answer
Question 2/15
How do you write comments in HTML?
Select your answer
Question 3/15
Which HTML attribute specifies an alternate text for an image, if the image cannot be displayed?
Select your answer
Question 4/15
What is the correct HTML element for inserting a line break?
Select your answer
Question 5/15
Which HTML element is self-closing?
Select your answer
Question 6/15
What is the correct HTML for creating a text input field?
Select your answer
Question 7/15
What is the correct HTML for inserting an image?
Select your answer
Question 8/15
Which of the following HTML elements is used for creating a hyperlink?
Select your answer
Question 9/15
What attribute is used to uniquely identify an HTML element?
Select your answer
Question 10/15
Which HTML element can be used to display styled text in different sizes and colors?
Select your answer
Question 11/15
Which HTML attribute is used to define inline styles?
Select your answer
Question 12/15
What is the correct HTML element for the largest heading?
Select your answer
Question 13/15
How can you open a link in a new tab/browser window in HTML?
Select your answer
Question 14/15
Which HTML tag is used to define a table?
Select your answer
Question 15/15
Which element is typically used to contain navigation links?
Select your answer
Your Results
You did not answer any questions correctly.
Your Answers
Question 1/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
Which HTML tag is used to define an internal style sheet?
Available answers
The
<style>
tag is used in HTML to include internal CSS.
Question 2/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
How do you write comments in HTML?
Available answers
HTML comments are written with
<!-- and -->
.
Question 3/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
Which HTML attribute specifies an alternate text for an image, if the image cannot be displayed?
Available answers
The
alt
attribute provides alternative text for an image if it cannot be displayed.
Question 4/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
What is the correct HTML element for inserting a line break?
Available answers
The
<br>
element in HTML is used to insert a line break.
Question 5/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
Which HTML element is self-closing?
Available answers
The
<br>
tag is a self-closing tag used to insert a single line break.
Question 6/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
What is the correct HTML for creating a text input field?
Available answers
The correct HTML for creating a text input is
<input type="text">
.
Question 7/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
What is the correct HTML for inserting an image?
Available answers
The
<img>
tag is used to embed an image in an HTML page, with src
specifying the path to the image.
Question 8/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
Which of the following HTML elements is used for creating a hyperlink?
Available answers
The
<a>
tag is used to define hyperlinks in HTML.
Question 9/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
What attribute is used to uniquely identify an HTML element?
Available answers
The
id
attribute is used to specify a unique identifier for an HTML element.
Question 10/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
Which HTML element can be used to display styled text in different sizes and colors?
Available answers
The
<span>
element is used for inline styling with CSS.
Question 11/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
Which HTML attribute is used to define inline styles?
Available answers
The
style
attribute is used to apply inline CSS styles to an HTML element.
Question 12/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
What is the correct HTML element for the largest heading?
Available answers
The
<h1>
tag defines the largest heading. Headings in HTML range from <h1>
to <h6>
, with <h1>
being the largest and most important.
Question 13/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
How can you open a link in a new tab/browser window in HTML?
Available answers
The attribute
target="_blank"
specifies that the link will open in a new tab or window.
Question 14/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
Which HTML tag is used to define a table?
Available answers
The
<table>
tag is used to create tables in HTML.
Question 15/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
Which element is typically used to contain navigation links?
Available answers
The
<nav>
element is used to group navigation links.