Open In App

Onsen UI CSS Component Category List Header

Last Updated : 22 Jun, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Onsen UI CSS is used to create beautiful HTML components. It is one of the most efficient ways to create HTML5 hybrid components that are compatible with both mobile and desktop.

Lists are used to store data or information on web pages in ordered or unordered form. Onsen UI CSS Component Category List Header is used to create the header in the list using the list-header class.

Onsen UI CSS Component Category List Header Class:

  • list-header: This class is used to create the list header.

Syntax:

<ul class="list">
  <li class="list-header">
    ...
  </li>
  ...
</ul>

Example 1: The following example demonstrates the Onsen UI CSS Component Category List Header.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <!-- CDN links of Onsen UI library -->
    <link rel="stylesheet" href=
    <link rel="stylesheet" href=
    <script src=
    </script>
</head>
  
<body>
    <center>
        <h2 style="color: green;">
            GeeksforGeeks
        </h2>
        <strong>
            Onsen UI CSS Component Category List Header
        </strong> <br> <br>
  
        <ul class="list">
            <li class="list-header">
              This is Header
            </li>
            <li class="list-item">
              <div class="list-item__center">
                List item 1
              </div>
            </li>
        </ul>
    </center>
</body>
  
</html>


Output:

 

Example 2: The following example demonstrates the Onsen UI CSS Component Category List Header.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <!-- CDN links of Onsen UI library -->
    <link rel="stylesheet" href=
    <link rel="stylesheet" href=
    <script src=
    </script>
</head>
  
<body>
    <center>
        <h2 style="color: green;">
            GeeksforGeeks
        </h2>
        <strong>
            Onsen UI CSS Component Category List Header
        </strong> <br> <br>
  
        <ul class="list">
            <li class="list-header 
                       list-header--material">
              This is Material Header
            </li>
            <li class="list-item">
                <div class="list-item__center">
                    List item 1
                </div>
            </li>
            <li class="list-item">
                <div class="list-item__center">
                    List item 2
                </div>
            </li>
        </ul>
    </center>
</body>
  
</html>


Output:

 

Reference: https://onsen.io/v2/api/css.html#list-category



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

Similar Reads