From the course: Crafting Meaningful HTML

Unlock the full course today

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

Understanding the misunderstood <hr>

Understanding the misunderstood <hr> - HTML Tutorial

From the course: Crafting Meaningful HTML

Start my 1-month free trial

Understanding the misunderstood <hr>

- The HR tag is one of those early tags you might learn in web development. Historically HR stands for horizontal rule. In other words, draw a horizontal line on the page. That's it, the line didn't mean anything but you could easily add a line wherever you wanted it. There's no semantic meaning behind a horizontal line however, and so for a long time developers stopped using HR in their documents in favor of putting in horizontal lines, using borders and CSS, which is a much better way to do this. Today, however, the HR tag has been redefined to indicate a change in theme. Within the same section or article, there may be different minor changes that happen. The HR tag indicates where those changes happen. For example, here we have a title for this portion of the page, which is a description of how olive oil is made. We can wrap a section tag around this, or even an article tag might be more appropriate as this might be a story about how to make olive oil. But just to keep this a bit…

Contents