From the course: CSS: Display

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Block elements

Block elements - CSS Tutorial

From the course: CSS: Display

Block elements

- [Instructor] Block elements are the other default value you'll encounter with your HTML elements. In general, a block element is one that holds big blocks of information, elements like section, article, aside, header, footer, and body are all block level, but a number of other elements that contain content are also block level, like paragraphs, headings, tables and lists. The generic block level element without semantic meaning is the div element. So let's take a look at these block elements in more detail. I'm going to start by putting a border around the h1 that I have here on line two. So say h1 and then I'm going to say border, three pixels dotted green. And you'll see here that that stretches all the way across the page. Notice that as I start to flex the display section of the page here, that green box stays the same width which is the width of that display area over there on the side of the page. The h1 is a…

Contents