Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Predict Page Layout with Different Element Types | Section
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
CSS Fundamentals for React Developers - 1768407374224

bookChallenge: Predict Page Layout with Different Element Types

Task

Examine the provided HTML code and predict how the page will look in the browser. There are three <div> elements, each containing a combination of an inline and block-level element.

<div>
  <span>This is an inline element</span>
  This is a block-level element.
</div>

<div>
  This is a block-level element.
  <span>This is an inline element</span>
</div>

<div>
  This is a block-level element.
  <span>This is an inline element</span>
  This is another block-level element.
</div>

Questions to Consider

  1. How will the inline and block-level elements interact within each <div>?
  2. How will the order of elements affect the layout?
  3. What will be the visual hierarchy of inline and block-level elements within each <div>?
  1. How will the inline and block-level elements interact within each <div>?
    • In the first and second <div>, the <span> element (inline) appears before the text (block-level);
    • In the third <div>, the <span> element is in the middle of the text (block-level).
  2. How will the order of elements affect the layout?
    • In the first <div>, the text "This is a block-level element." will likely appear below the inline element due to the default block-level behavior of the <div> container;
    • In the second <div>, the order of elements is reversed, so the text will likely appear above the inline element;
    • In the third <div>, the text and inline element are interspersed, so the layout might show the text and inline element in the sequence.
  3. What will be the visual hierarchy of inline and block-level elements within each <div>?
    • The inline element (<span>) is likely to appear inline with the text in all cases, but its position might vary based on the order of elements within the <div>.
index.html

index.html

index.css

index.css

copy
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 26

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

bookChallenge: Predict Page Layout with Different Element Types

Deslize para mostrar o menu

Task

Examine the provided HTML code and predict how the page will look in the browser. There are three <div> elements, each containing a combination of an inline and block-level element.

<div>
  <span>This is an inline element</span>
  This is a block-level element.
</div>

<div>
  This is a block-level element.
  <span>This is an inline element</span>
</div>

<div>
  This is a block-level element.
  <span>This is an inline element</span>
  This is another block-level element.
</div>

Questions to Consider

  1. How will the inline and block-level elements interact within each <div>?
  2. How will the order of elements affect the layout?
  3. What will be the visual hierarchy of inline and block-level elements within each <div>?
  1. How will the inline and block-level elements interact within each <div>?
    • In the first and second <div>, the <span> element (inline) appears before the text (block-level);
    • In the third <div>, the <span> element is in the middle of the text (block-level).
  2. How will the order of elements affect the layout?
    • In the first <div>, the text "This is a block-level element." will likely appear below the inline element due to the default block-level behavior of the <div> container;
    • In the second <div>, the order of elements is reversed, so the text will likely appear above the inline element;
    • In the third <div>, the text and inline element are interspersed, so the layout might show the text and inline element in the sequence.
  3. What will be the visual hierarchy of inline and block-level elements within each <div>?
    • The inline element (<span>) is likely to appear inline with the text in all cases, but its position might vary based on the order of elements within the <div>.
index.html

index.html

index.css

index.css

copy
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 26
some-alt