Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Робота з Блочними Елементами | Бокс Модель та Відстань між Елементами
Основи CSS
course content

Зміст курсу

Основи CSS

Основи CSS

2. CSS для Тексту
3. Бокс Модель та Відстань між Елементами
4. Флексбокс
5. Декоративні Ефекти

book
Робота з Блочними Елементами

Block-level elements can be identified as rectangular, and they stack on top of each other. They prevent any other elements from sharing the same line with them. This behavior is achieved by applying the CSS property:

css

Main considerations when working with block-level elements:

  • They are inherently set to display: block;
  • Their width spans the entire width allowed by the parent element;
  • The height is initially determined by content, but it can be customized using CSS;
  • Each block element starts on a new line;
  • Properties like border, margin, padding, width, and height can be adjusted.

Now, let's explore an example where we manipulate width, height, and margin:

html

index.html

css

index.css

copy

Let's consider how we can center an element inside its parent.

html

index.html

css

index.css

copy
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 3. Розділ 8
Ми дуже хвилюємося, що щось пішло не так. Що трапилося?
some-alt