How to List Inline in Bootstrap 5

Last Updated on February 12, 2025 by Roshan Parihar

Learn how to inline list elements in Bootstrap 5 and other versions. You can use the class .list-inline and .list-inline-item in Bootstrap 5.

Let’s find out with examples

Inline List in Bootstrap 5

To inline list elements in Bootstrap 5, you have to add the .list-inline class to the ul element. Also, add the .list-inline-item class to the li element as given below.

Test it Live

Output

Bootstrap 5 list inline

The above examples shows the inline lists content. You can click the button given above to see the live preview of the example.

Bootstrap 4 List Inline Class

If you want to make lists inline in Bootstrap 4, use the class .list-inline to ul and .list-inline-item class to the li element.

Test it Live

Output

Bootstrap 4 list inline

You can check the live preview to see the inline elements of lists.

Class In Bootstrap 3

Bootstrap 3 require only to add the class .list-inline to the ul element to make the inlined lists as given below.

Test it Live

Output

Bootstrap 3 list inline

Click the button given above to see the live preview of lists inlined.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.