display: inline;

  • IE
  • Cr
  • Sf
  • Fx
  • O

The display property changes the display type of an element.

When you apply this property to the LI element, the horizontal list can be created.

li {
display: inline;

Property Value Explanation
display inline the element is displayed as an inline element


<title>TAG index</title>

<style type="text/css">

li {
display: inline;
margin-right: 20px;





  • First
  • Second
  • Third