Wednesday, 2 Jul 2025
  • My Feed
  • My Interests
  • My Saves
  • History
  • Blog
Subscribe
Code Reveals
  • Home
  • HTML

    What are the async and defer attributes in the “script” tag?

    By Chief Editor

    What are the different types of HTML tags?

    By Chief Editor

    What is a Meta Tag in HTML?

    By Chief Editor

    What is Block level Element and Inline Level Element?

    By Chief Editor

    What is Doctype HTML in HTML?

    By Chief Editor

    What is the difference between “HTML” and “HTML5”?

    By Chief Editor
  • JavaScript
    What are the Lexical Scope in JavaScript

    What are the Lexical Scope in JavaScript?

    By Chief Editor

    What is memoization in JavaScript?

    By Chief Editor

    What is a Promise in JavaScript, and what are its parameters?

    By Chief Editor

    Explain Deep Copy and Shallow Copy in JavaScript.

    By Chief Editor

    What is hoisting in JavaScript with an example?

    By Chief Editor

    What is Callback Hell in JavaScript?

    By Chief Editor
  • Frontend Interview

    What is Position in CSS?

    By Chief Editor

    Difference Between position: relative and position: absolute in CSS

    By Chief Editor

    How to Reverse a String in JavaScript: Two Essential Methods

    By Chief Editor

    Is JavaScript a synchronous or asynchronous language?

    By Chief Editor

    What is Symentic HTML?

    By Chief Editor

    Explain Deep Copy and Shallow Copy in JavaScript.

    By Chief Editor
  • Backend Interview

    What are the different types of HTML tags?

    By Chief Editor

    What is Arrow and Normal Function in JavaScript?

    By Chief Editor

    Lazy Loading in React.js: Boosting Performance and Reducing Load Time

    By Chief Editor

    What is memoization in JavaScript?

    By Chief Editor

    What is React Fiber and its importance in react?

    By Chief Editor

    Mastering Star Rating Systems: Best Practices and Optimized Code Examples

    By Chief Editor
  • Other
    • Contact Us
  • Frontend Interview
  • Backend Interview
  • React Interview
  • JavaScript Interview
  • Contacts Us
  • Advertise with Us
  • Complaint
  • Privacy Policy
  • Cookie Policy
  • Submit a Tip
  • 🔥
  • ReactJS
  • JavaScript
  • JavaScript Interview
  • React Interview
  • HTML
  • Frontend Interview
  • CSS
  • Redux
  • Javascript
  • System Design
Font ResizerAa
Code RevealsCode Reveals
  • My Saves
  • My Interests
  • My Feed
  • History
  • Technology
Search
  • Homepage
  • Pages
    • Home
    • Blog Index
    • Contact Us
    • Search Page
    • 404 Page
  • Features
    • Post Headers
    • Layout
  • Personalized
    • My Feed
    • My Saves
    • My Interests
    • History
  • About
  • Categories
    • Technology
  • Categories
Have an existing account? Sign In
Follow US
© 2022 Code Reveals Inc. All Rights Reserved.

Home What is Block level Element and Inline Level Element?

Frontend InterviewHTML

What is Block level Element and Inline Level Element?

Chief Editor
Last updated: February 15, 2025 11:15 am
Chief Editor
Share
SHARE

Block-level Elements

Block-level elements occupy the entire width of their parent container (by default) and create a new line (or block) before and after the element. They are generally used to structure the layout of a webpage.

Contents
Block-level ElementsExamples of Block-level Elements:Inline-level ElementsExamples of Inline-level Elements:
  • Characteristics of Block-level Elements:
  • Always start on a new line.
  • Occupy the full width of their container.
  • Can contain other block-level or inline elements.
  • Default width is 100% of the parent container.

Examples of Block-level Elements:

  <div>
  <p>
  <h1>, <h2>, <h3>, etc.
  <section>
  <article>
  <aside>
  <header>
  <footer>
  <ul>, <ol>, <li>
  <table>
  

Inline-level Elements

Inline-level elements do not start on a new line and only occupy as much width as necessary. They are typically used for styling or formatting small portions of text or content within a block-level element.

Characteristics of Inline-level Elements:

  • Do not start on a new line
  • Occupy only the width of their content.
  • Cannot contain block-level elements (only inline elements or text).
  • Flow inline with surrounding text.

Examples of Inline-level Elements:

  <span>
  <a>
  <strong>, 
  <b>
  <img>
  <label>
  <em>, <i>, 
  <small>, <sub>,<sup>,
  
Share This Article
Email Copy Link Print
Previous Article Difference Between position: relative and position: absolute in CSS
Next Article What is Position in CSS?
Leave a Comment

Leave a Reply Cancel reply

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

Your Trusted Source for Accurate and Timely Updates!

Our commitment to accuracy, impartiality, and delivering breaking news as it happens has earned us the trust of a vast audience. Stay ahead with real-time updates on the latest events, trends.
FacebookLike
XFollow
InstagramFollow
YoutubeSubscribe
LinkedInFollow
QuoraFollow
- Advertisement -
Ad imageAd image

Popular Posts

Is JavaScript a synchronous or asynchronous language?

JavaScript is primarily a synchronous, single-threaded language, but it also supports asynchronous programming through features…

By Chief Editor

What is hoisting in JavaScript with an example?

Hoisting is a behavior in JavaScript where variables and function declarations are moved to the…

By Chief Editor

Explain the useState and useEffect hooks in React

Hooks are special functions in React that let you use state and other React features…

By Chief Editor

You Might Also Like

What is Symentic HTML
Frontend InterviewHTML

What is Symentic HTML?

By Chief Editor
HTML

What is a Meta Tag in HTML?

By Chief Editor
JavaScriptFrontend Interview

Explain Deep Copy and Shallow Copy in JavaScript.

By Chief Editor
CSSFrontend Interview

What is Position in CSS?

By Chief Editor

Code Reveals is a cutting-edge software development company dedicated to delivering high-quality, scalable, and innovative solutions for businesses of all sizes. Our team of expert developers, designers, and engineers specializes in creating custom software, web applications, mobile apps, and enterprise solutions that are tailored to meet the unique needs of our clients.

Most Famous
  • HTML
  • CSS
  • JavaScript
  • Node
Top Categories
  • Frontend Interview
  • Backend Interview
  • React Interview
  • JavaScript Interview
Usefull Links
  • Contacts Us
  • Advertise with Us
  • Complaint
  • Privacy Policy
  • Cookie Policy
  • Submit a Tip

©2025  Code Reveals Inc. All Rights Reserved.

Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?