HTML (Hypertext Markup Language) elements are usually either "block-level" elements or "inline" elements. A block-level element occupies the entire space of its parent element (container), thereby creating a "block." This article helps to explain what this means.
Browsers typically display the block-level element with a newline both before and after the element. You can visualize them as a stack of boxes.
A block-level element always starts on a new line and takes up the full width available (stretches out to the left and right as far as it can).
The following example demonstrates the block-level element's influence:
<p>This paragraph is a block-level element; its background has been colored to display the paragraph's parent element.</p>
p { background-color: #8ABB55; }
<body> element.There are a couple of key differences between block-level elements and inline elements:
The distinction of block-level vs. inline elements is used in HTML specifications up to 4.01. In HTML5, this binary distinction is replaced with a more complex set of content categories. The "block-level" category roughly corresponds to the category of flow content in HTML5, while "inline" corresponds to phrasing content, but there are additional categories.
The following is a complete list of all HTML block level elements (although "block-level" is not technically defined for elements that are new in HTML5).
<address><article> HTML5
<aside> HTML5
<blockquote><canvas> HTML5
<dd><div><dl><dt><fieldset><figcaption> HTML5
<figure> HTML5
<figcaption>).<footer> HTML5
<form><h1>, <h2>, <h3>, <h4>, <h5>, <h6>
<header> HTML5
<hgroup> HTML5
<hr><li><main><nav>
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements