I know there is a hr (horizontal rule) in html, but I don’t believe there is a vr (vertical rule). Am I wrong and if not, why isn’t there a vertical rule?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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:
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:
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:
Note that you need to specify a height or fill the container with content.