Blog Detail

Home Blog Detail

What is inline block & Block Element?

Blog Img
Inline Element:

An inline element does not start on a new line. Its only takes up as much width as necessary.

Examples:
  • <span>
  • <a>
  • <strong>
  • <em>
  • <img>
  • <code>
  • <label>
  • <em>
Block Element:

Block elements are elements that take up the full width of their container and always start on a new line.

Examples:
  • <div>
  • <p>
  • <h1>, <h2>, <h3>, etc.
  • <ul>, <ol>, <li>
  • <section>
  • <article>

© 2025Think4u. All Rights Reserved.