Know the answer? Post it. Somebody with the same question will find it here.
Sachin SinghRank #66 · 26.2K reputationPosted Oct 18, 2022, 2:31 AM EDT
+3
Block level elements are those which covers the whole width meaning will always come below / above any other element and never be side by side ex:- h2,h1
However inline elements will come inline meaning side by side. ex:- Span
+3
Onkar SharmaRank #104 · 20.6K reputationPosted Dec 28, 2022, 9:56 AM EST
+3
Hi Naresh,
Here is the definition of both HTML elements:
Block-level Elements: A block-level element always starts on a new line and takes up the full width available. For example,
and
Inline Elements: An inline element does not start on a new line and occupies as much space as is necessary. For example,
By default, inline elements do not force a new line to begin in the document flow.Block elements, on the other hand, typically cause a line break to occur.
+2
Vishal YelveRank #178 · 13.6K reputationPosted Dec 29, 2022, 10:31 AM EST
+2
Inline Elements
Block Elements
Inline elements occupy only sufficient width required.
Block Elements occupy the full width irrespective of their sufficiency.
Inline elements don’t start in a new line.
Block elements always start in a line.
Inline elements allow other inline elements to sit behind.
Block elements doesn’t allow other elements to sit behind
Sachin SinghRank #66 · 26.2K reputationPosted Oct 18, 2022, 2:31 AM EDT
Block level elements are those which covers the whole width meaning will always come below / above any other element and never be side by side ex:- h2,h1
However inline elements will come inline meaning side by side. ex:- Span
Onkar SharmaRank #104 · 20.6K reputationPosted Dec 28, 2022, 9:56 AM EST
Hi Naresh,
Here is the definition of both HTML elements:
Block-level Elements: A block-level element always starts on a new line and takes up the full width available. For example, and
- https://www.w3schools.com/html/html_blocks.asp
- https://www.geeksforgeeks.org/difference-between-block-elements-and-inline-elements/
Inline Elements: An inline element does not start on a new line and occupies as much space as is necessary. For example,
And, to know more about them, visit:
Thanks!
Brahma Prakash ShuklaRank #633 · 3.8K reputationPosted Dec 29, 2022, 6:37 AM EST
By default, inline elements do not force a new line to begin in the document flow. Block elements, on the other hand, typically cause a line break to occur.
Vishal YelveRank #178 · 13.6K reputationPosted Dec 29, 2022, 10:31 AM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts