0
0
HTMLmarkup~20 mins

Bold and italic text in HTML - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Bold and Italic Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
rendering
intermediate
2:00remaining
What is the visual output of this HTML snippet?
Look at this HTML code and choose what you will see in the browser.
HTML
<p>This is <strong>bold</strong> and <em>italic</em> text.</p>
AThe words 'bold' appear thick and 'italic' appear slanted.
BThe words 'bold' and 'italic' both appear underlined.
CThe words 'bold' and 'italic' both appear in uppercase letters.
DThe words 'bold' and 'italic' both appear with a strikethrough line.
Attempts:
2 left
💡 Hint
Think about what and tags do to text style.
📝 Syntax
intermediate
2:00remaining
Which HTML code correctly makes the word 'Hello' bold and italic?
Choose the correct HTML snippet that makes 'Hello' both bold and italic.
A<strong><i>Hello</i></strong>
B<em><strong>Hello</strong></em>
C<b><i>Hello</i></b>
D<strong><em>Hello</em></strong>
Attempts:
2 left
💡 Hint
Tags must be properly nested and closed in order.
selector
advanced
2:00remaining
Which CSS selector targets only elements inside elements?
You want to style only italic text that is inside bold text. Which CSS selector should you use?
Astrong em
Bem strong
Cstrong > em
Dem > strong
Attempts:
2 left
💡 Hint
Think about the order and relationship between parent and child in selectors.
layout
advanced
2:00remaining
How does combining and tags affect text layout?
If you write Text, how will the text appear visually and in layout?
AText appears italic only, ignoring bold styling.
BText appears bold and italic, and takes up space as normal inline text.
CText appears only bold, ignoring italic styling.
DText appears bold and italic, but becomes a block element pushing content below.
Attempts:
2 left
💡 Hint
Both and are inline elements affecting style but not layout block.
accessibility
expert
3:00remaining
Which is the best semantic way to mark important italicized text for screen readers?
You want to mark text as important and italic for screen readers and visual users. Which HTML is best?
A<em><strong>Text</strong></em>
B<strong>Text</strong>
C<strong><em aria-label="important emphasis">Text</em></strong>
D<em>Text</em>
Attempts:
2 left
💡 Hint
Consider both semantic meaning and accessibility labels.