Headings Would Be Block Elements
Paragraphs are blocks, too. However, <em> and <strong>
elements are not. They are inline elements.
Block elements define the flow of the HTML document, while inline elements
- Block boxes always appear below the previous block element. This is the natural or 'static' flow of an HTML document when it gets rendered by a web browser.
- The width of block boxes is set automatically based on the width of its parent container. In this case, our blocks are always the width of the browser window.
- The default height of block boxes is based on the content it contains. When you narrow the browser window, the h1 gets split over two lines, and its height adjusts accordingly.
- Inline boxes donâ€™t affect vertical spacing. Theyâ€™re not for determining layout theyâ€™re for styling stuff inside of a block.
- The width of inline boxes is based on the content it contains, not the width of the parent element.