Open In App

Semantic-UI Segment Colored Variation

Semantic UI is an open-source development framework that provides pre-defined classes to make our website look beautiful, amazing, and responsive. It is similar to Bootstrap which has predefined classes. It uses jQuery and CSS to create the interfaces. It can also be directly used via CDN like bootstrap.

Semantic UI provides the users various coloured segment classes to place them on the website and look the segments more beautiful. In this article, we will learn about Segment Coloured Variation.



Semantic UI Segment Coloured Variation Classes:

Syntax:



<div class="ui color .... segment"></div>

Example 1: The following code demonstrates the segment coloured variation classes.




<!DOCTYPE html>
<html>
  
<head>
    <title>Semantic-UI Segment Colored Variation</title>
    <link rel="stylesheet" 
          href=
    <script src=
    </script>
    <script src=
    </script>
</head>
  
<body>
    <center>
        <h1 class="ui green header">
          Geeksforgeeks
        </h1>
        <strong>
            Semantic-UI Segment Color Variations
        </strong>
        <br />
        <br />
        <div class=" ui container">
            <div class="ui blue segment">Blue</div>
            <div class="ui violet segment">Violet</div>
            <div class="ui purple segment">Purple</div>
            <div class="ui pink segment">Pink</div>
            <div class="ui black segment">Black</div>
        </div>
    </center>
</body>
  
</html>

Output:

Semantic-UI Segment Colored Variation

Example 2: The following code demonstrates the inverted segment coloured variation classes.




<!DOCTYPE html>
<html>
  
<head>
    <title>Semantic-UI Segment Colored Variation</title>
    <link rel="stylesheet" 
          href=
    <script src=
    </script>
    <script src=
    </script>
</head>
  
<body>
    <center>
        <h1 class="ui green header">Geeksforgeeks</h1>
        <strong>
            Semantic-UI Segment Color Variations
        </strong>
        <br />
        <br />
        <div class=" ui container">
            <div class="ui violet inverted segment">
              Violet
            </div>
            <div class="ui purple inverted segment">
              Purple
            </div>
            <div class="ui pink inverted segment">
              Pink
            </div>
            <div class="ui brown inverted segment">
              Brown
            </div>
            <div class="ui black inverted segment">
              Black
            </div>
        </div>
    </center>
    <script src=
    </script>
</body>
  
</html>

Output:

Semantic-UI Segment Colored Variation

Reference: https://semantic-ui.com/elements/segment.html#colored


Article Tags :