What are block levels elements in html | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What are block levels elements in html

8th Oct 2017, 11:13 AM
Mehmood Ul Hassan
Mehmood Ul Hassan - avatar
2 Answers
+ 8
Block level elements work as a container in a html document. It occupies the entire space of its parent elements creating a block. A block-level element always starts on a new line and takes up the full width available (stretches out to the left and right as far as it can). check this documentation for further information https://www.w3schools.com/html/html_blocks.asp
8th Oct 2017, 11:31 AM
Ranjan Bagri
Ranjan Bagri - avatar
+ 2
Try it yourself, to see the difference between block, inline, inline-block and default. https://code.sololearn.com/WUWrSMiCq8v6/?ref=app
10th Oct 2017, 8:32 AM
Calviղ
Calviղ - avatar