Open In App

Onsen UI CSS Component List title

Last Updated : 18 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.

Onsen UI CSS Component List title is used to give a title of the list. We can give the title using the list-title class.

Onsen UI CSS Component List title Class:

  • list-title: This class is used to give the title of the list.

Syntax:

<div class="list-title">
    ...
</div>
<ul class="list">
  ...
</ul>

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

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 List title
        </strong>
          
        <div class="list-title">
            This is list Title
        </div>
        <ul class="list">
            <li class="list-item">
                GFG item 1
            </li>
            <li class="list-item">
                GFG item 2
            </li>
        </ul>
    </center>
</body>
  
</html>


Output:

 

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

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 List title
        </strong>
          
        <div class="list-title">
            TITLE IS GEEKSFORGEEKS
        </div>
        <ul class="list">
            <li class="list-item">
                <div class="list-item__left">
                    <img class="list-item__thumbnail" 
                         src=
                </div>
                <div class="list-item__center">
                    <div class="list-item__title">
                        GeeksforGeeks website
                    </div>
                    <div class="list-item__subtitle">
                        A Computer Science portal for geeks. 
                    </div>
                </div>
            </li>
  
            <li class="list-item">
                <div class="list-item__left">
                    <img class="list-item__thumbnail" 
                         src=
                </div>
                <div class="list-item__center">
                    <div class="list-item__title">
                        GFG
                    </div>
                    <div class="list-item__subtitle">
                        GeeksforGeeks
                    </div>
                </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