Skip to content

Commit

Permalink
quiz/css: add "Use Cases" row to the display property comparison table (
Browse files Browse the repository at this point in the history
  • Loading branch information
Trupti0406 authored Dec 30, 2024
1 parent a410b95 commit e2b4cb7
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ title: What's the difference between `block`, `inline`, and `inline-block`?
| Can be aligned with `vertical-align` | No | Yes | Yes |
| Margins and paddings | All sides respected. | All sides respected. | Only horizontal sides respected. Vertical sides, if specified, do not affect layout. Vertical space it takes up depends on `line-height`, even though the `border` and `padding` appear visually around the content. |
| Float | - | - | Becomes like a `block` element where you can set vertical margins and paddings. |
| Use Cases | Layout elements like `<div>`, `<p>`, `<section>`. | Used for buttons, images, and form fields that need custom sizes but stay in line with text. | Links `<a>`, text formatting `<span>`, text styling - bold `<b>`, italics `<i>`.|

0 comments on commit e2b4cb7

Please sign in to comment.