1.

What makes a block-level element different from an inline element in HTML?

Answer»
BLOCKInline

A block-level element is drawn as a block that will always start on a NEW line and will stretch to occupy the full WIDTH AVAILABLE to it, i.e. the width of its container.

Examples of block-level elements by default: <div>, <img>, <section>, <form>, <nav>.

Inline items are drawn where they are defined and take up only the space that is required. Looking at how text flows on a page is the simplest approach to understand how they work.

Examples of inline elements by default: <span>, <B>, <strong>, <a>, <input>.



Discussion

No Comment Found