How do I style the vertical bar i.e. "|"? I need to vary the width and the height of the "|".
This is what I am trying to do.
<a href="link1"> Link 1 </a> | <a href="link2"> Link 2 </a>
The pipe character is not hidden on a keyboard. It is located right above the Enter key. Another way to type the vertical bar character is to turn on the numeric keypad, hold ALT , then press 1, 2, and 4.
What is the vertical bar ( | )? The vertical bar ( | ) -- also called the vertical line, vertical slash, pipe, pipe symbol or upright slash -- is a symbol used in mathematics, computing and other areas to represent a specific type of logic or operation, depending on its context.
The <hr> tag in HTML is used to produce a horizontal line. However, there is no tag for creating a vertical line. The border-left CSS attribute can be used to simulate a vertical line. The border-left property of CSS is used to style the left-side border.
Answer: Use the CSS border Property You can use the CSS border property on a <span> element in combination with the other CSS property like display and height property to make vertical lines in HTML. The following example will create a vertical separator line between two images.
Put it in an element, and style the element:
<span class="bar">|</span>
In your style sheet, for example:
.bar { font-size: 20px; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With