Changed space to width (#23147)

It said that block level elements fill up the container's space. They only fill the width.
This commit is contained in:
Sigurd Morsby
2018-11-15 07:53:15 +01:00
committed by Manish Giri
parent e017f5474a
commit 5e91cd7553

View File

@ -3,15 +3,15 @@ title: Block and Inline Elements
---
## Block and Inline Elements
Let us understand them using below examples :
Let us understand them using below examples:
#### Code Sample with Output :
![Block Output](https://user-images.githubusercontent.com/16048167/31070017-6f2cf0a2-a77c-11e7-9de6-110b9d0b488d.PNG)
#### Block-Level Element :
A Block-level element occupies the entire space of the parent(container) such as `<div>` and `<p>` in the example .
A Block-level element occupies the entire width of the parent (container) such as `<div>` and `<p>` in the example.
Note that both `<div>` and `<p>` start from a new line each time, forming a **block-like** structure. Block-level elements begin on new lines.
Note that both `<div>` and `<p>` start from a new line each time, forming a **block-like** structure. Block-level elements *always* begin on new lines.
Common **block-level elements** are `<div>`,`<p>`,`<article>`,`<section>`,`<figure>`,`<footer>` etc.
@ -19,7 +19,7 @@ Common **block-level elements** are `<div>`,`<p>`,`<article>`,`<section>`,`<figu
#### Inline Element :
Inline as the name says "included as a part of the main text and not as a separate section". Inline elements occupy the space as needed within the space defined by the main element. Unlike block-level elements, they do not begin on new lines.
Inline as the name says "included as a part of the main text and not as a separate section". Inline elements occupy the width as needed within the space defined by the main element. Unlike block-level elements, they do not begin on new lines.
Some of the **inline elements** are `<a>`,`<span>`,`<img>`,`<code>`,`<cite>`,`<button>`,`<input>` etc.