Open In App

Semantic-UI List Horizontal Variation

Last Updated : 27 Feb, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Semantic UI is an open-source framework that uses CSS and jQuery to build great user interfaces. It is the same as a bootstrap for use and has great different elements to use to make your website looks more amazing. It uses a class to add CSS to the elements.

Semantic-UI list provides  us different variations of the list, like Horizontal, Inverted, Selection, Animated, Relaxed, Divided, Celled, and Size variants. Here we will learn about Semantic-UI List Horizontal Variation is used to display the list items horizontally.

Semantic-UI List Horizontal Variation Class:

  • horizontal: This class is used to create horizontally formatted list items.

Syntax:

<div class="ui horizontal list">
    <div class="item">...</div>
    ...
</div>

Example 1: In this example, we are creating list items with the horizontal variation.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>
        Semantic-UI List Horizontal Variation
    </title>
  
    <link rel="stylesheet" href=
</head>
  
<body>
    <div class="ui container">
        <h2 style="color:green">
            GeeksforGeeks
        </h2>
  
        <h3>Semantic-UI List Horizontal Variation</h3>
  
        <div class="ui link horizontal list">
            <div class="active item">GeeksforGeeks</div>
            <a class="item">Data Structure</a>
            <a class="item">Algorithm</a>
            <a class="item">Interview Preparation</a>
            <a class="item">Competitive Programming</a>
            <a class="item">Machine Learning</a>
            <a class="item">Web Development</a>
        </div>
    </div>
</body>
  
</html>


Output:

Semantic-UI List Horizontal Variation

Semantic-UI List Horizontal Variation

Example 2: In this example, we are creating list of items with horizontal variation.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>
        Semantic-UI List Horizontal Variation
    </title>
  
    <link rel="stylesheet" href=
</head>
  
<body>
    <div class="ui container">
        <h2 style="color:green">
            GeeksforGeeks
        </h2>
  
        <h3>Semantic-UI List Horizontal Variation</h3>
  
        <div class="ui horizontal list">
            <div class="item">
                <img class="ui avatar image" src=
                <div class="content">
                    <a class="header">GeeksforGeeks</a>
                </div>
            </div>
            <div class="item">
                <img class="ui avatar image" src=
                <div class="content">
                    <a class="header">Data Structure</a>
                </div>
            </div>
            <div class="item">
                <img class="ui avatar image" src=
                <div class="content">
                    <a class="header">Algorithm</a>
                </div>
            </div>
            <div class="item">
                <img class="ui avatar image" src=
                <div class="content">
                    <a class="header">Web Development</a>
                </div>
            </div>
        </div>
    </div>
</body>
  
</html>


Output:

Semantic-UI List Horizontal Variation

Semantic-UI List Horizontal Variation

Reference: https://semantic-ui.com/elements/list.html#horizontal



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads