html-block-and-inline Flashcards
How do block-level elements affect the document flow?
Block elements will always appear to start on a new line in the browser window and take up the entire width of their parent element. Their height is fixed to as much as the content needs. Their width and height cannot be set.
How do inline elements affect the document flow?
Inline elements will always appear to continue on the
same line as their neighbouring elements and take up the width and height of their content. Their height is fixed to as much as the text content needs. Their width and height cannot be set.
What are the default width and height of a block-level element?
The entire width of their parent element and just as much height of the content in the block element.
What are the default width and height of an inline element?
The width and height of the content in the inline element.