Html – How to align list side by side

csshtml

I have to two list. I want to display them in side by side like this

A C

B D

A and B are in same list as well as C and D are in same list.

Best Answer

Just use to ul and make them float:left;

HTML

<ul>
    <li>1</li>
    <li>2</li>
</ul>

<ul>
   <li>3</li>
   <li>4</li>
</ul>

CSS

ul
{
float:left;
margin:0 5px;
}

See Demo