eg:
<ul>
<li>a</li>
<li>b</li>
</ul>
By default it generates: ab
But I want:
a
b
How can I do that?
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.
Remember that HTML is a markup language, and defines the semantics (meaning) of the contents. The problem of having the list displayed horizontally is a presentational (display) problem. Therefore the solution you’re looking for would involve CSS.
By floating the
lielements, we can achieve the effect you want:You can also try turning the
lielements into inline or inline-block elements:Be aware of the other effects associated with using these CSS properties. Have a look at these articles on how these properties work: