In this post, we will learn how to create a vertical line with HTML and CSS.  A vertical line is like a divider between two things. So how we can create a vertical line, we will learn in this post.


How To Create A Vertical Line With HTML And CSS ?


Create A Vertical Line

Two create a vertical line we use  display border ,  and  height  CSS property. In this following example we create a vertical line between two boxes.


<!DOCTYPE html>
<html>
<head>
<title>How To Create A Vertical Line With HTML And CSS ?</title>
<style>

.vl{
display: inline-block;
border-left: 2px solid #000;
margin: 0 10px;
height: 400px;
}

</style>
</head>
<body>

<div class="vl"></div>

</body>
</html> code-box



Summary

In this post we learned how to create a vertical line with HTML and CSS. You try to make it yourself. I hope you make. If you face any problem, then comment and tell us. Keep visiting the blog to read more similar posts.

Post a Comment

Previous Post Next Post