From the course: CSS: Display

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Block elements

Block elements - CSS Tutorial

From the course: CSS: Display

Start my 1-month free trial

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