Jump to content

How to draw a vertical line in HTML...?


Rashmee Verma

Recommended Posts

It depends on what you're using the line for. CSS is used for styling purposes. You can apply a left or right border to your element using the CSS border property. If you're using columns of text, lines can be placed between the columns using the column-rule property

I recommend not using the <hr> element solely for decoration, use border-bottom instead. The <hr> element is meant to signify a change in the topic being written about before and after the line, as described here: http://www.w3schools.com/tags/tag_hr.asp

  • Like 1
Link to comment
Share on other sites

There are two ways to draw a Vertical line, first is very simple use HTML5 Canvas line property. go here http://www.tutorialspark.com/html5/HTML5_Canvas_Lines.php .

Next is to use the Column Rule property to draw vertical line. But that is useful only for textual content. Learn more about it here http://www.tutorialspark.com/css3/CSS3_MultipleColumns_Layout.php

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...