Block element
block element has width, height, border, padding and margin . The full box model is applied to them. It take up the whole width of the page. It break a newline before and after each element. Floated element are also block element but do not take up full width of page.
Inline element
Do not break a newline , but stay 'inline' with the rest of the content. Inline element do not have width and height dimension. Margin top and bottom are ignored. Padding top and bottom exist but won't push element above and below it away. Sideways margin and padding will push content away from it. Both inline and inline block element will have some spaces when there is whitespace between them.
Inline-block element
Behave like a block level element but do not break a new line. It will stay 'inline' with the rest of the content.
block element has width, height, border, padding and margin . The full box model is applied to them. It take up the whole width of the page. It break a newline before and after each element. Floated element are also block element but do not take up full width of page.
Inline element
Do not break a newline , but stay 'inline' with the rest of the content. Inline element do not have width and height dimension. Margin top and bottom are ignored. Padding top and bottom exist but won't push element above and below it away. Sideways margin and padding will push content away from it. Both inline and inline block element will have some spaces when there is whitespace between them.
Inline-block element
Behave like a block level element but do not break a new line. It will stay 'inline' with the rest of the content.
Comments
Post a Comment