There are 3 main types of blocks in HTML: Block-Level, Inline, and Inline-Block. This entry will cover the second of the 3 elements: Inline.

Inline elements, unlike Block-Level elements, only occupies the space necessary for its content; causes no line-breaks after or before the element. Box models also applies in a different way to Inline blocks: height and widths DO NOT apply to them; padding and margins only applies to their left and right side.

Default element examples: <a>, <img>, <strong>, <em>, <button>.

With CSS: display: inline;

By Levi

Leave a Reply

Your email address will not be published. Required fields are marked *