Challenge - 5 Problems
Inline Elements Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Identify the inline element
Which of the following HTML tags is an inline element by default?
Attempts:
2 left
💡 Hint
Think about elements that do not start on a new line and are used inside text.
✗ Incorrect
The <span> tag is an inline element used to style parts of text without breaking the flow. <div>, <section>, and <article> are block-level elements that start on a new line.
📝 Syntax
intermediate1:30remaining
Correct inline element usage
Which option correctly uses inline elements to emphasize text within a paragraph?
HTML
<p>This is a <em>very</em> important message.</p>
Attempts:
2 left
💡 Hint
Inline elements can be placed inside paragraphs without breaking the line.
✗ Incorrect
The <em> tag is inline and used to emphasize text. Using block elements like <div>, <section>, or <article> inside a paragraph is invalid and breaks the flow.
❓ rendering
advanced2:00remaining
Visual difference between inline and block elements
What will you see in the browser when rendering this HTML?
<div>Block 1</div><span>Inline 1</span><div>Block 2</div><span>Inline 2</span>
<div>Block 1</div><span>Inline 1</span><div>Block 2</div><span>Inline 2</span>
HTML
<div>Block 1</div><span>Inline 1</span><div>Block 2</div><span>Inline 2</span>
Attempts:
2 left
💡 Hint
Block elements start on new lines, inline elements flow within lines.
✗ Incorrect
Block elements like <div> start on new lines, so 'Block 1' and 'Block 2' appear each on their own line. Inline elements like <span> appear next to text on the same line.
❓ selector
advanced2:00remaining
CSS selector for inline elements
Which CSS selector will select all inline elements inside a container with id 'content'?
Attempts:
2 left
💡 Hint
Inline elements include tags like span, em, and a.
✗ Incorrect
Option C selects common inline elements inside #content. Option C tries to exclude block elements but is complex and incomplete. Option C selects block elements. Option C is invalid.
❓ accessibility
expert2:30remaining
Accessibility of inline elements
Which practice improves accessibility when using inline elements for emphasis?
Attempts:
2 left
💡 Hint
Screen readers rely on semantic tags to understand emphasis.
✗ Incorrect
Using semantic tags like <em> or <strong> helps screen readers announce emphasis. Styling alone with <span> or <div> does not convey meaning to assistive technologies.