THE BEST NEWSLETTER ANYWHERE
Join 6,000 subscribers and get a daily digest of full stack tutorials delivered to your inbox directly.No spam ever. Unsubscribe any time.
It is a short tutorial with examples to make horizontal and vertical lines in CSS.
When we need to divide two HTML components, the hr tag in HTML creates a horizontal line between them. Horizontal lines in HTML are simple to create using the hr tag, border, or custom CSS styles.
The hr tag in HTML uses to provide thematic breaks between content.
The hr tag in HTML uses to draw horizontal line breaks. The hr tag has the following features: - No closing tag is needed.
Here’s an HTML example of the horizontal line.
<!DOCTYPE html>
<html>
<head>
<style>
</style>
</head>
<body>
<p>Paragraph1</p>
<hr/>
<p>Paragraph2</p>
</body>
</html>
hr is a line break used to draw a line.
You can write a line without using the hr tag. As an example, How do I add a line to a div?
In this example, CSS border with color and line width
<!doctype html>
<html lang="en">
<!DOCTYPE html>
<html>
<head>
<style>
.horizontal-line {
padding-bottom: 20px;
border-bottom: 3px solid #f0f0f0;
}
</style>
</head>
<body>
<div class="horizontal-line">This is div element</div>
</body>
</html>
🧮 Tags
Recent posts
Julia examples - Variable Type Nim example - Convert String to/from the Int How to get length of an array and sequence in Nim? Nim environment variables - read, set, delete, exists, and iterate examples? How to convert from single character to/from string in Nim?Related posts