+ 1

What are inline and block elements?

4th Jul 2017, 11:24 AM
Eyob G. Hagos
Eyob G. Hagos - avatar
2 Respuestas
+ 1
Block elements are elements that can contain other elements, but inline elements can't contain any block element between their tags. Example: Block elements: div; p; h1; ol; etc. Inline elements: a, b, img etc. For more information see HTML fundamentals course, lesson HTML Basics and "Bolck and Inline elements".
4th Jul 2017, 12:06 PM
Ledio Deda
Ledio Deda - avatar
+ 3
Block elements can contains any elements, but not inlined: that's true, but not the fundamental difference ^^ + Block element take the whole width available, and next element are placed below, on a new line. + Inline element takes only the needed width of their content, and next inlined element is placed on same line, without introducing a line break...
4th Jul 2017, 3:45 PM
visph
visph - avatar