Mid JavaScript

What are block-level and inline elements?

  • Block-level elements start on a new line and take full width (e.g., <div>, <p>,

<section>).

  • Inline elements stay within a line (e.g., <span>, <a>, <strong>).

Example:

<div>Block</div>

<span>Inline</span>

Key Takeaway:

Block = structure; Inline = styling or small content.

More from JavaScript Tutorial

All questions for this course