vertical line in html – How to make a vertical line in HTML?

vertical line in html To make a vertical line, use border-left or border-right property. in this example learn To create a vertical line with CSS, the code is as follows −Example Live Demo.

vertical line in html

Also You can use the horizontal rule tag to create vertical lines. A vertical line can be created in HTML using transform property in hr tag.

<hr width="2" size="800">

How to create a vertical line with CSS?

.myCustomCls {
  border-left: thick solid #3d3d3d;
}

//HTML Code
<div class="myCustomCls">
  Tamil Rockers is a torrent website which facilitates the illegal distribution of copyrighted material, including television shows, movies, music and videos.
</div>

Full Example(index.html)

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
   .shopingLn {
      border-left: 6px solid rgb(128, 0, 128);
      height: 500px;
      margin-left: 5%;
   }
</style>
</head>
<body>
<h2>Vertical Line Example - www.pakainfo.com<h2>
<div class="shopingLn"></div>
</body>
</html>

How to Create Vertical Line in HTML?

Using Border-Right, Height and Position CSS Property – It creates a vertical line using border-right, height and position property.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vertical Line in html - www.pakainfo.com</title>
    <style>

        body {
            text-align: center;
        }

        .myCustomCls {
            height: 300px;
            border-right: 1px solid #000900;
            position: absolute;
            right: 50%;
        }
    </style>
</head>

<body>
    <h1>Vertical Line using HTML and CSS</h1>
    <div class="myCustomCls">
        Tamil Rockers is a torrent website which facilitates the illegal distribution of copyrighted material, including television shows, movies, music and videos.
        <p>
           using border-right, height and position property
        </p>
        TamilBlasters.com Latest Movies Download. TamilBlasters New Tamil Dubbed Movies Multi Audios Telugu Kannada Malayalam Hindi Download tamilblasters.
    </div>
</body>

</html>

Vertical line using Border-Left, Height, and Position CSS Property

It creates a vertical line using border-left, height and position property.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vertical Line in html - www.pakainfo.com</title>
    <style>

        body {
            text-align: center;
        }
        /* CSS to add vertical line in the left */

        .myCustomCls {
            height: 300px;
            border-left: 1px solid #000900;
            position: absolute;
            left: 50%;
        }
    </style>
</head>

<body>
    <h1>Vertical Line using HTML and CSS</h1>
    <div class="myCustomCls">
        TamilBlasters.com Latest Movies Download. TamilBlasters New Tamil Dubbed Movies Multi Audios Telugu Kannada Malayalam Hindi Download tamilblasters.
        <p>
           vertical line using border-left, height and position property
        </p>
        Tamil Rockers is a torrent website which facilitates the illegal distribution of copyrighted material, including television shows, movies, music and videos.
    </div>
</body>

</html>

Don’t Miss : bootstrap vertical divider

how to make a vertical line on html

index.html

<table class="table table-bordered table-dark">
  <thead>
    <tr>
      <th scope="col">#</th>
      <th scope="col">Member</th>
      <th scope="col">Friend</th>
      <th scope="col">Action</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th scope="row">1</th>
      <td>Jagruti</td>
      <td>Keyut</td>
      <td>@ddd</td>
    </tr>
    <tr>
      <th scope="row">2</th>
      <td>Radhika</td>
      <td>Bhavika</td>
      <td>@rk89</td>
    </tr>
    <tr>
      <th scope="row">3</th>
      <td colspan="2">Dipti sharma</td>
      <td>@fmail</td>
    </tr>
  </tbody>
</table>

I hope you get an idea about vertical line in html.
I would like to have feedback on my infinityknow.com.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.