Open In App

Semantic-UI | Statistics

Last Updated : 20 May, 2020
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 look more amazing. It uses a class to add CSS to the elements. Statistics show the current value of an attribute.

Example 1:




<!DOCTYPE html>
<html>
  
<head>
    <title>Semantic UI</title>
    <link href=
        rel="stylesheet" />
</head>
  
<body>
    <div style="margin-top: 20px" 
            class="ui container">
        <div class="ui statistic">
            <div class="value">
                14, 080
            </div>
            <div class="label">
                Views
            </div>
        </div>
    </div>
    <script src=
    </script>
</body>
  
</html>


Output:

Example 2: Group of Stats




<!DOCTYPE html>
<html>
  
<head>
    <title>Semantic UI</title>
    <link href=
        rel="stylesheet" />
  
    <script src=
    </script>
</head>
  
<body>
    <div style="margin-top: 20px" class="ui container">
        <div class="ui statistic">
            <div class="ui statistics">
                <div class="statistic">
                    <div class="value">
                        150
                    </div>
                    <div class="label">
                        Likes
                    </div>
                </div>
                <div class="statistic">
                    <div class="value">
                        280
                    </div>
                    <div class="label">
                        Comments
                    </div>
                </div>
                <div class="statistic">
                    <div class="value">
                        12
                    </div>
                    <div class="label">
                        Shares
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
  
</html>


Output:

Example 3: Stats with Image and Icon




<!DOCTYPE html>
<html>
  
<head>
    <title>Semantic UI</title>
    <link href=
        rel="stylesheet" />
  
    <script src=
    </script>
</head>
  
<body>
    <div style="margin-top: 20px" class="ui container">
        <div class="ui statistics">
            <div class="statistic">
                <div class="value">
                    <i class="world icon"></i> 580
                </div>
                <div class="label">
                    Notifications
                </div>
            </div>
            <div class="statistic">
                <div class="value">
                    <img src=
                        class="ui circular inline image">
                    200k
                </div>
                <div class="label">
                    Followers
                </div>
            </div>
        </div>
    </div>
</body>
  
</html>


Output:

Example 4: Horizontal




<!DOCTYPE html>
<html>
  
<head>
    <title>Semantic UI</title>
    <link href=
        rel="stylesheet" />
</head>
  
<body>
    <div style="margin-top: 20px" class="ui container">
        <div class="ui horizontal statistic">
            <div class="value">
                20
            </div>
            <div class="label">
                Downloads
            </div>
        </div>
    </div>
    <script src=
    </script>
</body>
  
</html>


Output:

Example 5: Coloured Stats




<!DOCTYPE html>
<html>
  
<head>
    <title>Semantic UI</title>
    <link href=
        rel="stylesheet" />
</head>
  
<body>
    <div style="margin-top: 20px" class="ui container">
        <div class="ui statistics">
            <div class="red statistic">
                <div class="value">
                    207
                </div>
                <div class="label">
                    Views
                </div>
            </div>
            <div class="orange statistic">
                <div class="value">
                    78
                </div>
                <div class="label">
                    Likes
                </div>
            </div>
        </div>
    </div>
    <script src=
    </script>
</body>
  
</html>


Output:



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

Similar Reads