0
0
HTMLmarkup~20 mins

Em vs i tag in HTML - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Emphasis Expert
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Difference between and tags
Which statement best describes the difference between the and tags in HTML?
A<em> is deprecated and should not be used, while <i> is the modern tag for emphasis.
B<i> is used for emphasis and affects screen readers, while <em> is for text styling without emphasis.
C<em> is used for emphasis and affects screen readers, while <i> is for text styling without emphasis.
D<em> and <i> tags are completely interchangeable with no difference.
Attempts:
2 left
💡 Hint
Think about how screen readers treat these tags differently.
rendering
intermediate
1:30remaining
Visual output of vs
What will the browser visually display for this HTML snippet?
<p>This is <em>important</em> and this is <i>italic</i>.</p>
AThe words 'important' and 'italic' are both shown in italic style.
BThe word 'important' is bold and 'italic' is italicized.
COnly 'important' is italicized; 'italic' is normal text.
DBoth words are bold and underlined.
Attempts:
2 left
💡 Hint
Both tags usually render text in italics by default.
accessibility
advanced
2:00remaining
Screen reader behavior with and
When a screen reader reads this HTML:
<p>This is <em>very important</em> and <i>just styled</i> text.</p>

How does it treat the and parts?
AIt reads both 'very important' and 'just styled' with vocal emphasis.
BIt adds vocal emphasis to 'very important' but reads 'just styled' normally.
CIt ignores both tags and reads all text the same.
DIt skips the <em> text and only reads the <i> text.
Attempts:
2 left
💡 Hint
Consider which tag conveys meaning beyond style.
📝 Syntax
advanced
2:00remaining
Correct nesting of and tags
Which HTML snippet is correctly nested and valid?
A<p>This is <em>very <em>important</i></em> text.</p>
B<p>This is <i>very <em>important</i></em> text.</p>
C<p>This is <i>very <i>important</em></i> text.</p>
D<p>This is <em>very <i>important</i></em> text.</p>
Attempts:
2 left
💡 Hint
Tags must open and close in the correct order.
selector
expert
2:30remaining
CSS selector targeting inside
Given this HTML:
<p><i>This is <span><em>special</em></span> text</i>.</p>

Which CSS selector will style only the tag inside the tag?
Ai em { color: red; }
Bi > em { color: red; }
Cem i { color: red; }
Dp em { color: red; }
Attempts:
2 left
💡 Hint
Think about descendant vs direct child selectors.