If you have been using HTML, you would have definitely come across tags like <div>,<span>,<p>,<a> and many more. But, did you take the time to understand how the content is being displayed in these elements? Or did you notice the different ways that these elements treat properties like padding, margin, width, and height. In this article, we will dive deeper into these aspects of elements.

Let’s start with understanding what is display property? As the name suggests, display property controls the display behavior of an element. Every element has its own default value for display according to its nature.

We…

Rahul Rawat

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store