Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a vertical line in HTML

Tags:

html

css

How do you make a vertical line using HTML?

like image 940
Gopal Avatar asked Jun 30 '10 10:06

Gopal


People also ask

How do you create a vertical line in HTML?

To make a vertical line, use border-left or border-right property. The height property is used to set the height of border (vertical line) element. Position property is used to set the position of vertical line. Example 1: It creates a vertical line using border-left, height and position property.

Is there a vertical line tag in HTML?

There isn't any tag to create a vertical line in HTML.

How do you add a line in HTML?

Adding the Horizontal Line using <hr> tag: The Horizontal Rule tag (<hr>) is used for the purpose of inserting horizontal lines in the HTML document in order to separate sections of the document.


1 Answers

Put a <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>
like image 56
Kris van der Mast Avatar answered Sep 22 '22 14:09

Kris van der Mast