DEV Community

Mukesh
Mukesh

Posted on

Difference between Inline element and Block-level element in HTML.

****Block-level element

  • A block-level element always starts on a new line.

  • You can modify the width, height, padding and marging using css.

  • They contain other block-level and inline element.

****Inline element

  • An Inline element doesn't start on a new line.

  • By default, you cannot set a fixed width or height on an inline element.

  • They only contain text or other inline element but not block-level element.

Top comments (0)