NEW
Font size
S
M
L
XL
WorksheetsHTML semantics and attributes worksheet
Total questions: 21
Worksheet time: 11mins
Name
Class
Date
1.
A checkbox must be checked by default. Which attribute fits?
a)
checked
b)
selected
c)
marked
d)
default
2.
A user uploads an image but if it fails, screen readers should still understand it. Which attribute is required?
a)
title
b)
alt
c)
id
d)
aria-label
3.
You want a logo that acts as a link to the home page and opens in the same tab. What should you use?
a)
<img src='logo.png'>
b)
<a href='/home'><img src='logo.png'></a>
c)
<link rel='logo'>
d)
<a target='_blank'><img src='logo.png'></a>
4.
A developer wants a section for blog posts that can be independently syndicated. Which tag is best?
a)
<article>
b)
<section>
c)
<div>
d)
<aside>
5.
A form must not submit without a value in "Email". Which attribute is correct?
a)
validate
b)
optional="false"
c)
required
d)
mandatory
6.
A link must download the file instead of opening it in the browser. Which attribute should be added?
a)
src
b)
download
c)
open
d)
file
7.
You want to play a video with custom controls visible to users. Which element is used?
a)
<media controls>
b)
<movie controls>
c)
<video controls>
d)
<stream controls>
8.
You want to group navigation links. Which semantic element should wrap them?
a)
<nav>
b)
<ul>
c)
<header>
d)
<aside>
9.
A table header cell needs to indicate column scope for accessibility. Which attribute?
a)
aria-col
b)
for
c)
headers
d)
scope
10.
You want to provide a tooltip explaining an abbreviation. Which attribute is used?
a)
tip
b)
alt
c)
title
d)
desc
11.
A developer needs a layout structure where each section has its own heading. Which tag?
a)
<div>
b)
<section>
c)
<aside>
d)
<span>
12.
You need two input fields: Name and Email. How should they be properly labeled for accessibility?
a)
Place text before input only
b)
Use <label> linked with for
c)
Use <strong> above input
d)
Use placeholders only
13.
An item on a page is supplementary, like related ads. Where should it go?
a)
<section>
b)
<aside>
c)
<footer>
d)
<article>
14.
A long address should be marked as contact information. Which tag is appropriate?
a)
<info>
b)
<contact>
c)
<address>
d)
<footer>
15.
Developer must ensure date values are machine-readable for events. Which element should be used?
a)
<date>
b)
<time> with datetime
c)
<moment>
d)
<span class='date'>
16.
A list needs numbering that updates automatically when items are added/removed. Which element should be used?
a)
<ol>
b)
<ul>
c)
<list>
d)
<numlist>
17.
A user wants to fill comments with multiple lines of text. Which element suits this case?
a)
<input type='text'>
b)
<textarea>
c)
<input type='comment'>
d)
<p contenteditable>
18.
You want to represent code blocks in a technical article. Proper tags?
a)
<text>
b)
<script>
c)
<pre><code>
d)
<div>
19.
A developer wants to create an internal link to a section called "features". Which is correct?
a)
<a link='features'>
b)
<a href='#features'>
c)
<a goto='features'>
d)
<a route='features'>
20.
A checkbox must be checked by default. Which attribute fits?
a)
checked
b)
selected
c)
marked
d)
default
21.
A user clicks Submit but the page refresh must be prevented and validated with JS instead. Which attribute?
a)
async
b)
type='button'
c)
type='submit'
d)
defer
Reset
