Working with Inline Elements
Inline elements stay on a single line and wrap to the next line when space runs out. This behavior is controlled by the CSS property display: inline
.
Key points about inline elements:
- They default to
display: inline
; - Their width and height are determined by their content and cannot be explicitly set;
- Only horizontal properties like
padding
,margin
, andborder
can be applied.
Let's examine an example where some styles impact the element, while others do not, within the CSS file:
index.html
index.css
index.html
Obrigado pelo seu feedback!
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Awesome!
Completion rate improved to 2.5
Working with Inline Elements
Deslize para mostrar o menu
Inline elements stay on a single line and wrap to the next line when space runs out. This behavior is controlled by the CSS property display: inline
.
Key points about inline elements:
- They default to
display: inline
; - Their width and height are determined by their content and cannot be explicitly set;
- Only horizontal properties like
padding
,margin
, andborder
can be applied.
Let's examine an example where some styles impact the element, while others do not, within the CSS file:
index.html
index.css
index.html
Obrigado pelo seu feedback!