Loading

Quipoin Menu

Learn • Practice • Grow

html / Inline Element
interview

Q1. What are inline elements in HTML?
Inline elements do not start on a new line and only take as much width as necessary. Examples: <span>, <a>, <strong>, <em>, <img>.

Q2. What are the characteristics of inline elements?
They flow with text, ignore width and height properties, respect only horizontal margins and padding.

Q3. Is <span> an inline or block element?
<span> is an inline element used for styling small text portions without disrupting document flow.

Q4. Can inline elements contain block elements?
No, inline elements should not contain block elements. This violates HTML content model and causes invalid code.

Q5. How do inline elements behave with margins?
Inline elements respect left and right margins, but top and bottom margins do not affect document flow.