Coming as a beginner into HTML can be difficult, especially for the amount
of default properties and behaviors that are in place and nobody tells you about it. In this article, I am going to show you how these things work, how you can modify their default behavior, and help you get a better understanding of HTML that will be useful any time there is a roadblock in the rendering of your page.
The rendering flow of elements inside an HTML document depends on a property called display, this property sets how the item is going to behave inside the page. There are two default values for all the elements: block and inline. Let’s talk about block first, this property value sets the element to occupy all the available space in the same line. In other words, it generates a line break before and after the item so no other element renders next to it, making the next item in the code rendered below the block element.
As for inline property value, it makes the next element render where the previous one ends, creating a line of items if there is space available. However, they take only the necessary space to fit the content and their dimensions can’t be changed.
All the HTML elements have a default display value. Elements with the
block display property value include but are not limited to:
, ,
#learning-html #web-design #learning-to-code #secrets #microverse #html-css #html #html-fundamentals