I want to render this list in a single line.
Should be shown as
*List item2 *List item2
What CSS style to use?
ul li{ display: inline; }
For more see the basic list options and a basic horizontal list at listamatic. (thanks to Daniel Straight below for the links).
Also, as pointed out in the comments, you probably want styling on the ul and whatever elements go inside the li's and the li's themselves to get things to look nice.
2.1m questions
2.1m answers
60 comments
57.0k users