Quiz: Does HTML still belong on your résumé?
Prove yourself!
So, you think you got HTML5 skills?
After all, you know your <div>
from your <span>
, right? But how well do you know the more advanced, semantic elements in HTML5?
Note: If you can’t pass this test, you legally have to remove
HTML Skills
from your Resume.
Begin!
Warmup
What is the primary role of the <ul>
element in HTML?
The <ul>
tag creates an unordered list, with items typically marked by bullets.
Advanced Semantic HTML
What does the <dd>
element represent in HTML?
The <dd>
element defines the “Description Definition” in a description list, used within <dl>
tags to pair with <dt>
(Description Term).
This is useful when showing key-value data. Profile information, Settings, and Stats are a common examples.
Advanced Semantic HTML
When should the <figure>
and <figcaption>
elements be used?
The <figure>
tag is typically used to wrap self-contained (media) content, like an image or chart, along with <figcaption>
to provide a caption.
This is useful for images, diagrams, code snippets, and more.
Advanced Semantic HTML
What is the purpose of the <article>
element in HTML?
The <article>
element is used to define a standalone piece of content that can be independently distributed or reused.
It is often used for blog posts, news articles, forum posts, or user comments.
You can use multiple articles on a page (for infinitely scrolling pages, for example). Or, you can nest them within each other to create a hierarchy of “standalone content.”
Advanced Semantic HTML
What is the purpose of <fieldset>
and <legend>
elements in a form?
<fieldset>
is used to group related form controls, and <legend>
provides a title/label for the group, improving accessibility.
This is useful for grouping related form elements, like a section for shipping address or payment details.
Advanced Semantic HTML
What is the purpose of the <meter>
element?
The <meter>
element is used to represent a scalar (single) measurement within a set range, such as temperature, disk usage or a vote tally.
It may seem similar to a <progress>
bar, however progress bars ALWAYS start at zero. Therefore <progress>
elements show a percent of completion
, while a <meter>
shows any value within a definable range.
Semantic HTML
Why is the <source>
element used?
The <source>
element is used to specify available media formats.
Specifically used with <video>
, <audio>
, and <picture>
elements, allowing the browser to choose the most suitable format.
Advanced Semantic HTML
Why should you use a <dialog>
element?
The <dialog>
element is used for pop-ups or modals, and provides semantic markup, extended CSS, and a native API for these interactions.
It’s functionally like a <div>
- with a few extra built-in features.
According to MDN: JavaScript should be used to display the
<dialog>
element. Use the .showModal() method to display a modal dialog and the.show()
method to display a non-modal dialog. The dialog box can be closed using the.close()
method or using the dialog method when submitting a<form>
that is nested within the<dialog>
element. Modal dialogs can also be closed by pressing the Esc key.
Advanced Semantic HTML
How are <date>
and <time>
elements used in HTML?
The <time>
element is used for date and time, which can include human-readable content and machine-readable datetime
attributes.
Advanced Semantic HTML
What is the purpose of ARIA attributes?
ARIA (Accessible Rich Internet Applications) attributes enhance web accessibility by providing extra context for screen readers and other assistive technologies.
There are roles, states, and properties that can be used to describe elements.
Advanced Semantic HTML
What is the use of the role
attribute in HTML?
The role
attribute describes
the purpose of an element to assistive technologies, helping improve accessibility.
So, how did you do? Excited to use more semantic HTML elements in your next project? 🚀
Or, resigned to <div>
and <span>
for life? 😅
Let me know in the comments below! 👇