Is there a vr (vertical rule) in html?

No, there is no vertical rule.

EDIT: It’s 2021 (twelve years after I answered this question), and I no longer think my original explanation is true:

(original explanation)

It does not make logical sense to have one. HTML is parsed sequentially, meaning you lay out your HTML code from top to bottom, left to right how you want it to appear from top to bottom, left to right (generally) A vr tag does not follow that paradigm.

I’m not sure why a VR tag was never introduced, but it’s likely not because of the way HTML is parsed – there are many different layout modes in HTML/CSS now that do not follow this “paradigm”.

If I were to now speculate as to why there is no VR tag, I might look at MDN’s definition of the HR tag as a clue:

The HTML <hr> element represents a thematic break between paragraph-level elements: for example, a change of scene in a story, or a shift of topic within a section.

In practice, however, the <hr> tag often ends up used for things other than it’s semantic meaning. Although it may seem based on it’s real world use that there should be a <vr> tag, it probably would not resemble anything related to the semantic definition of the <hr> tag. It was probably never thought to be introduced.

My hunch is that the creators would suggest that the domain of the solution for this problem lies in CSS, not HTML (and most of the answers to this SO question reflect that).

Nixinova’s solution looks like the most elegant and modern solution to this problem.

(The rest of my old answer follows below):

This is easy to do using CSS, however. Ex:

<div style="border-left:1px solid #000;height:500px"></div>

Note that you need to specify a height or fill the container with content.

Leave a Comment