0
0
HTMLmarkup~5 mins

Inline elements in HTML - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What are inline elements in HTML?
Inline elements are HTML elements that do not start on a new line and only take up as much width as necessary. They flow within the text.
Click to reveal answer
beginner
Name three common inline elements in HTML.
Common inline elements include <span>, <a>, and <strong>.
Click to reveal answer
beginner
How do inline elements differ from block elements?
Inline elements stay within the line and do not break the flow, while block elements start on a new line and take full width by default.
Click to reveal answer
intermediate
Can inline elements contain block elements inside them?
No, inline elements should not contain block elements. This can cause unexpected layout issues.
Click to reveal answer
beginner
What is the purpose of the <span> element?
<span> is an inline element used to group text or other inline elements for styling or scripting without affecting layout.
Click to reveal answer
Which of the following is an inline element?
A<code>&lt;em&gt;</code>
B<code>&lt;div&gt;</code>
C<code>&lt;section&gt;</code>
D<code>&lt;article&gt;</code>
What happens when you put a block element inside an inline element?
AIt works perfectly with no issues.
BThe block element will be ignored.
CIt can cause layout problems and is invalid HTML.
DThe inline element becomes a block element automatically.
Which inline element is best for adding a link inside a paragraph?
A<code>&lt;a&gt;</code>
B<code>&lt;section&gt;</code>
C<code>&lt;span&gt;</code>
D<code>&lt;div&gt;</code>
Inline elements by default:
AStart on a new line and take full width.
BAlways have a border.
CAre invisible in the browser.
DDo not start on a new line and take only needed width.
Which inline element is used to apply styles or scripts to part of text without changing layout?
A<code>&lt;div&gt;</code>
B<code>&lt;span&gt;</code>
C<code>&lt;header&gt;</code>
D<code>&lt;footer&gt;</code>
Explain what inline elements are and how they behave in HTML layout.
Think about how text flows naturally in a sentence.
You got /4 concepts.
    List some common inline elements and describe a use case for each.
    Consider elements you use inside paragraphs.
    You got /3 concepts.