What is the difference between inline and inline block?

Sorry for the stupid question, I just couldn’t find a tutorial/thread.

1 Like

Good question they are very similar. Inline elements don’t accept width or height attributes. Inline elements will accept margin and padding but will only push elements horitontally but not vertically.

An inline-block element will sit inline with the document flow but the differenece is that you can use height and width attributes and elements will be pushed away horizontally and vertically.

Here is an artical on it.

7 Likes