Open In App

Semantic-UI Table Structured Type

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.

Tables are an easy way to organize a lot of data. A table is an arrangement of data in rows and columns, or possibly in a more complex structure. Tables are widely used in communication, research, and data analysis. Tables are useful for various tasks such as presenting text information and numerical data. It can be used to compare two or more items in the tabular form layout. Tables are used to create databases. An HTML table and a Semantic UI table both are the same structurally.

In the case of a Structured Type of table, it is formatted to display complex structured data.

Semantic UI Table Structured Type Class:

  • structured: This class defines that the type of table is structured.

Syntax:

<table class="ui structured table">
    <tr>
        <td></td>
        ...
    </tr>
    ...
</table>

Example 1: This is a basic example illustrating Table Structured Type made using Semantic UI.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>Semantic UI Table Structured Type</title>
    <link href=
        rel="stylesheet" />
        integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" 
        crossorigin="anonymous"
    </script>
    <script src=
    </script>
</head>
  
<body>
    <center>
        <h1 class="ui green header">GeeksforGeeks</h1>
        <strong>Semantic UI Table Structured Type</strong>
    </center>
    <table class="ui celled  structured table">
        <thead>
            <tr>
                <th rowspan="2">Type</th>
                <th rowspan="2">Name</th>
                <th rowspan="2">No.of.Questions</th>
                <th colspan="3">Difficulty</th>
            </tr>
            <tr>
                <th>Easy</th>
                <th>Medium</th>
                <th>Hard</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Non-Linear Data Structures</td>
                <td>Trees</td>
                <td class="right aligned">2</td>
                <td class="center aligned">
                    <i class="large green checkmark icon"></i>
                </td>
                <td></td>
                <td></td>
            </tr>
            <tr>
                <td rowspan="3">Linear Data Structures</td>
                <td>Arrays</td>
                <td class="right aligned">52</td>
                <td class="center aligned">
                    <i class="large green checkmark icon"></i>
                </td>
                <td></td>
                <td></td>
            </tr>
            <tr>
                <td>Stacks</td>
                <td class="right aligned">12</td>
                <td></td>
                <td class="center aligned">
                    <i class="large green checkmark icon"></i>
                </td>
                <td></td>
            </tr>
            <tr>
                <td>Queues</td>
                <td class="right aligned">21</td>
                <td class="center aligned">
                    <i class="large green checkmark icon"></i>
                </td>
                <td></td>
                <td></td>
            </tr>
        </tbody>
    </table>
</body>
  
</html>


Output:

Example 2: This is a basic example illustrating Table Structured Type with different States made using Semantic UI.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>Semantic UI Table Structured Type</title>
    <link href=
        rel="stylesheet" />
        integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" 
        crossorigin="anonymous"
    </script>
    <script src=
    </script>
</head>
  
<body>
    <center>
        <h1 class="ui green header">GeeksforGeeks</h1>
        <strong>Semantic UI Table Structured Type</strong>
    </center>
    <table class="ui celled  structured table">
        <thead>
            <tr>
                <th rowspan="2">Type</th>
                <th rowspan="2">Name</th>
                <th rowspan="2">No.of.Questions</th>
                <th colspan="3">Difficulty</th>
            </tr>
            <tr>
                <th>Easy</th>
                <th>Medium</th>
                <th>Hard</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Non-Linear Data Structures</td>
                <td>Trees</td>
                <td class="right aligned">2</td>
                <td class="center aligned active">
                    <i class="large green checkmark icon"></i>
                </td>
                <td class="error"></td>
                <td class="error"></td>
            </tr>
            <tr>
                <td rowspan="3">Linear Data Structures</td>
                <td>Arrays</td>
                <td class="right aligned">52</td>
                <td class="center aligned active">
                    <i class="large green checkmark icon"></i>
                </td>
                <td class="error"></td>
                <td class="error"></td>
            </tr>
            <tr>
                <td>Stacks</td>
                <td class="right aligned">12</td>
                <td class="error"></td>
                <td class="center aligned active">
                    <i class="large green checkmark icon"></i>
                </td>
                <td class="error"></td>
            </tr>
            <tr>
                <td>Queues</td>
                <td class="right aligned">21</td>
                <td class="center aligned active">
                    <i class="large green checkmark icon"></i>
                </td>
                <td class="error"></td>
                <td class="error"></td>
            </tr>
        </tbody>
    </table>
</body>
  
</html>


Output:

Reference: https://semantic-ui.com/collections/table.html#structured



Last Updated : 14 Mar, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads