A
A
AlexNew222022-04-15 21:43:48
HTML
AlexNew22, 2022-04-15 21:43:48

What are the key differences between block and inline elements?

I read the documentation and for some reason their differences are somehow described in a slippery way everywhere. The inline
element differs from the block element only in that the block element has a default width of 100%, and the inline element cannot occupy 100% of the parent block until we transfer it to inline block?
And you can put any other block or inline elements in a block element, but only inline elements in an inline element?
That's all?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2022-04-15
@firedragon

first block second row.
A wagon and a small cart are different.
In general, the difference is that the block allows you to more flexibly control positioning.
However, I recommend using the semantic model.
That is, ideally, html should not contain any class tags or style tags.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question