What is the difference between inline, inline-block, and block?

  1. Block Elements are <div> and <p>. They usually start on a new line and can take space for an entire row or width.
  2. Inline elements are <a>, <span>, <strong>, and <img> tags. They don’t start on a new line. However, they appear on the same line as the content and tags beside them.
  3. Inline block elements have padding and margins and set height and width values. Though, they are similar to inline elements. 

Comments

Leave a Reply

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