×
   ❮     
HTML CSS MySql Javascript SQL PYTHON JAVA C++ C# BOOTSTRAP REACT XML NODEJS ANGULAR DJango Rust Android VUE
     ❯   

HTML hr tag


hr tag in HTML:

In HTML, the "hr" tag is employed to create a horizontal rule- it is an invisible line or a divider that helps distinguish content on a website.

This is most frequently achieved through images and other contextual elements such as graphics and charts.

Example

"hr tag" is just a kind of a digital line or separator (highlighted) This line is purposed to be oblique, horizontally splitting the content visually.

Example

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Welcome to Our Website</title>
  <style>
    hr {
      margin-top: 20px;
      border: 1px solid #bdc3c7; /* Light gray color for horizontal rule */
    }
  </style>
</head>
<body>
  <h1>Welcome to Our Website</h1>
  <p>We offer a wide range of products to suit your needs.</p>
  <hr>
  <p>Contact us today to learn more about our services.</p>
</body>
</html>
Try it Yourself »

Hey there! Let's go for Learn fasta then! It is more than just coding; it is to have the superpower that can solve any problem. Through simple and easy-to-grasp examples you will sail through the learning process. In addition, it is not just about coding– you will acquire competencies on how to solve complex problems, analyze data, and come up with efficient solutions. Shall we start this wonderful journey together! learnfasta.com terms of use, Copyright 2025 All Rights Reserved.