Comprehensive HTML Interview Quiz Questions and Answers
January 23, 2023
This list of HTML interview questions and answers is a comprehensive guide to test your knowledge and prepare for your next interview. It covers the most important topics and concepts you need to know to become a front-end developer.
Try to answer the questions yourself before reading the answers. If you don't know all of them, don't worry. I didn't when I started making this list! 😅
For the ones you get wrong, try to find the answer online and play around with it in a code editor. Then come back to the list in a few days/weeks and try again. You'll be surprised how much you'll learn!
Interview Quiz Questions and Answers
HyperText Markup Language
World Wide Web Consortium (W3C)
A web browser and a text editor
An element consists of: opening tag, content, closing tag. Tags mark the beginning and end of elements.
An empty element
An empty element is an element that does not have any content. A void element is an empty element that cannot have any content.
A modifier of an HTML element.
As the first line of the document
In the browser's title bar
1. Tell search engines about the page contents. 2. Define what shows up in page link previews (via OpenGraph).
To submit a form using an image as the submit button.
It provides a list of pre-defined options for an input field, while still allowing for typing in of a non-pre-defined option.
figure is used to group media content and its caption. It is used in tandem with figcaption to add a caption either above or below the image.
Inline elements are displayed on the same line as other content and their width is determined by the content. Block elements are displayed on their own line and their width is determined by the width of their container.
a is used to create a link to another page or another part of the same page. link is used to link to an external stylesheet.
ul is used to create an unordered list, where the bullets will be regular circles. ol is used to create an ordered list, where the bullets will be incrementing numbers.
text will display the text as it is being typed. password will display dots instead of the text to protect the user from others seeing their password.
text is used for a single line of text. textarea is used for multiple lines of text.
meter is used to show a scalar measurement within a known range. slider is used to select a value from a range.
h1 through h6
ul -- unordered list
ol -- ordered list
dl -- definition list
The ruby element is used to add annotations to East Asian characters. Japanese uses this often.
This attribute allows the user to edit the content of an element.