How to make a vertical line in HTML

This page shows you how to make a vertical line in HTML. This is one of the common requirement for web developers.

How to make a vertical line in HTML?

Solution 1

Put an <div> around the markup where you want the line to appear to next, and use CSS to style it:
.verticalLine {
  border-left: thick solid #ff0000;
}
<div class="verticalLine">
  some other content
</div>

Solution 2

You can use the horizontal rule tag to create vertical lines.
<hr width="1" size="500">

References

https://stackoverflow.com/questions/3148415/how-to-make-a-vertical-line-in-html

Free Spring Boot Tutorial - 5 Hours Full Course


Watch this course on YouTube at Spring Boot Tutorial | Fee 5 Hours Full Course

Comments