Open lihongjie0209 opened 3 years ago
Inline elements:
Block elements:
Inline-block elements:
From W3Schools:
An inline element has no line break before or after it, and it tolerates HTML elements next to it. A block element has some whitespace above and below it and does not tolerate any HTML elements next to it. An inline-block element is placed as an inline element (on the same line as adjacent content), but it behaves as a block element.
When you visualize this, it looks like this:
Inline elements:
Block elements:
Inline-block elements:
From W3Schools:
When you visualize this, it looks like this: