I have a simple list like this, and I want to use | as the separator between each list item. How can I do this properly?
ul{
display: flex;
justify-content: space-evenly;
align-items: center
}
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
Current output: Item 1 Item 2 Item 3
Expected output: Item 1 | Item 2 | Item 3
The easiest way I can think of is to include the separator as an HTML element, it does look good to me for wrapping it with <li>, as their content semantically is irrelevant with the list. Besides, using a tag other than <li> in <ul>/<ol> is forbidden.
What is the best way to approach this issue?