What is the difference between inline-block and block display properties in CSS?

  • Inline elements flow in a line, and only take as much width as necessary. Block elements start on a new line and take the full width available.
  • Inline-block elements combine the features of both inline and block elements. They flow in a line and can have a width set.
  • Block elements are used for inline-level content, while inline-block elements are used for block-level content.
  • Inline elements are used for block-level content, while block elements are used for inline-level content.
The correct option explains that inline-block elements combine features of both inline and block elements, allowing them to flow in a line and have a set width.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *