+2 votes
in CSS by
What is the difference between inline, inline-block, and block?

1 Answer

+1 vote
by

Below are the difference between inline, inline-block, and block

Block Element: The block elements always start on a new line. They will also take space for an entire row or width. List of block elements are <div>, <p>.

Inline Elements: Inline elements don't start on a new line, they appear on the same line as the content and tags beside them. Some examples of inline elements are <a>, <span> , <strong>, and <img> tags. 

Inline Block Elements: Inline-block elements are similar to inline elements, except they can have padding and margins added on all four sides.

Related questions

0 votes
asked Feb 10 in CSS by DavidAnderson
0 votes
asked Jun 20, 2023 in HDFS by Robin
...