Open In App

Semantic-UI Table Warning State

Last Updated : 22 Mar, 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 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.

Warning State sets cells or rows to warn a user.

Semantic UI Table Warning State Classes:

  • table: This class creates a table in Semantic UI.
  • warning: This class is used on cell or row may warn a user
  • celled: This class divides each row of our table into separate cells.

Syntax:

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

Example 1: This is a basic example illustrating Table Warning State made using Semantic UI.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>Semantic UI Table Warning State</title>
    <link href=
    rel="stylesheet" />
</head>
  
<body>
    <center>
        <h1 class="ui green header">GeeksforGeeks</h1>
        <strong>Semantic UI Table Warning State</strong>
    </center>
    <table class="ui table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Status</th>
                <th>Notes</th>
            </tr>
        </thead>
        <tbody>
            <tr class="warning">
                <td>Jimmy</td>
                <td><i class="attention icon"></i
                    Requires Action
                </td>
                <td>None</td>
            </tr>
            <tr>
                <td>Jamie</td>
                <td>Unknown</td>
                <td class="warning">
                    <i class="attention icon"></i>
                    Hostile
                </td>
            </tr>
            <tr>
                <td>Jill</td>
                <td>Unknown</td>
                <td>None</td>
            </tr>
        </tbody>
    </table>
</body>
  
</html>


Output:

Example 2: This is a basic example illustrating Celled Table Warning State made using Semantic UI.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>Semantic UI Table Warning State</title>
    <link href=
        rel="stylesheet" />
</head>
  
<body>
    <center>
        <h1 class="ui green header">GeeksforGeeks</h1>
        <strong>Semantic UI Table Warning State</strong>
    </center>
    <table class="ui table celled">
        <thead>
            <tr>
                <th>Name</th>
                <th>Status</th>
                <th>Notes</th>
            </tr>
        </thead>
        <tbody>
            <tr class="warning">
                <td>Jimmy</td>
                <td><i class="attention icon"></i>
                    Requires Action
                </td>
                <td>None</td>
            </tr>
            <tr>
                <td>Jamie</td>
                <td>Unknown</td>
                <td class="warning">
                    <i class="attention icon"></i
                    Hostile
                </td>
            </tr>
            <tr>
                <td>Jill</td>
                <td>Unknown</td>
                <td>None</td>
            </tr>
        </tbody>
    </table>
</body>
  
</html>


Output:

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



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

Similar Reads