It is a learning series for CSS, In this series each article will have information related to CSS that I feel every web developer should know.
We as a developer, always struggle to move an element from one place to another. Being a developer, I feel that we should know some basics of CSS.
By learning of some basics you can make your page beautiful. So whoever wants to learn, the basics of CSS, like how to position an element, what is inline CSS, what are the inline elements and block level elments, when we use inline or block level elements, how to decide priority of a CSS etc. then this CSS series would definitely help you. I hope that after reading this series, you also will start loving CSS, as I did.
In this tutorial you are going to learn what is inline elements, block level elements, what they mean for a developer.
Inline elements: This means when you use inline elements they add in a line, for example, span is an inline elements. If I write
<span >CSS </span>
<span> is awesome </span> then they will appear in a line like ” CSS is awesome”.
Below is the list of inline elements:
span, em, lable, input, B, Img, TextArea etc..
Block elements: This means that if you use block level elements they are placed as a stack, means they are placed row by row. For example, div is a block level elements. If I write:
<div> CSS </div>
<div>is awesome </div> then result would be : CSS
< > : is awesome
Below is the list of block level elements:
Remember one thing that never use block level elements inside inline elements. Block elements can contain block and/or inline elements while inline elements can only contain other inline elements.
That’s it for now. In my next article, I will write about how positioning of elements work and how you can position your elements in Page. Thanks for reading this article.