0
0
HTMLmarkup~20 mins

What is an HTML element - Practice Questions & Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
HTML Element Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Identify the correct definition of an HTML element
Which option best describes what an HTML element is?
AA style rule that changes the color and font of text on a webpage.
BA script that runs in the browser to add interactivity to a webpage.
CA piece of content enclosed by opening and closing tags, possibly with attributes, that defines structure or meaning in a webpage.
DA file that contains images and videos used in a webpage.
Attempts:
2 left
💡 Hint
Think about what parts of HTML create the structure and content on a page.
📝 Syntax
intermediate
1:30remaining
Find the valid HTML element syntax
Which option shows a valid HTML element syntax?
A<p>This is a paragraph.</p>
B<p>This is a paragraph.
C<p>This is a paragraph.<p>
Dp>This is a paragraph.</p>
Attempts:
2 left
💡 Hint
Check if the element has both opening and closing tags correctly placed.
rendering
advanced
2:00remaining
What will the browser display for this HTML element?
Given the HTML code below, what will the browser show on the page?
HTML
<strong>Welcome</strong> to the site!
AWelcome to the site! (all normal text)
BWelcome to the site! (with 'Welcome' in bold)
C<strong>Welcome</strong> to the site! (tags visible as text)
DWelcome to the site! (with 'to the site!' in bold)
Attempts:
2 left
💡 Hint
The tag makes text bold.
selector
advanced
1:30remaining
Which CSS selector targets all HTML elements of type
?
You want to style all
elements on your page. Which CSS selector should you use?
A*article
B#article
C.article
Darticle
Attempts:
2 left
💡 Hint
Think about how to select elements by their tag name in CSS.
accessibility
expert
2:00remaining
Which HTML element and attribute combination improves accessibility for a navigation menu?
You have a navigation menu on your webpage. Which element and attribute combination best helps screen readers understand it?
A<nav aria-label="Main navigation">...</nav>
B<div id="nav">...</div>
C<section>...</section>
D<header role="banner">...</header>
Attempts:
2 left
💡 Hint
Consider semantic elements and ARIA labels for accessibility.