Open In App

Foundation CSS Tables Stripes

Foundation CSS is an open-source and responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to design beautiful responsive websites, apps, and emails that look amazing and can be accessible to any device. It is used by many companies such as Facebook, eBay, Mozilla, Adobe, and even Disney. The framework is built on Saas-like bootstrap. It is more sophisticated, flexible, and easily customizable. It also comes with CLI, so it’s easy to use it with module bundlers. It offers the Fastclick.js tool for faster rendering on mobile devices. 

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 Foundation CSS table both are the same structurally. Tables stripes mean that the rows in the table have alternate white and grey background colors which appear like stripes. 

Foundation CSS Tables Classes:



Syntax:

<table class="striped">
    <thead>
        ...
    </thead>
    <tbody>
        ...
    </tbody>
</table>

Note:

Example 1: This is a basic example illustrating tables with striped classes using Foundation CSS.




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Foundation CSS Tables Stripes</title>
   <!-- Compressed CSS -->
    <link rel="stylesheet"
          href=
</head>
<body>
  <center>
    <h1 style="color:green;">GeeksforGeeks</h1>
    <strong>Foundation CSS Tables</strong>
     <br/><br/>
    <table style="width:90%" class="striped">
      <tr>
        <th>Student Name</th>
        <th>Branch</th>
        <th>RollNo</th>
      </tr>
      <tr>
        <td>Ravi</td>
        <td>CSE</td>
        <td>001</td>
      </tr>
      <tr>
        <td>Naveen</td>
        <td>CSE</td>
        <td>002</td>
      </tr>
      <tr>
        <td>Srihita</td>
        <td>ECE</td>
        <td>003</td>
      </tr>
      <tr>
        <td>Aman</td>
        <td>MECH</td>
        <td>004</td>
      </tr>
    </table>
  </center>
</body>
</html>

Output:

Foundation CSS Tables Stripes

Example 2: This is a basic example illustrating an unstriped table using an unstriped class using Foundation CSS.




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Foundation CSS Tables Stripes</title>
    <!-- Compressed CSS -->
   <link rel="stylesheet"
         href=
</head>
<body>
  <center>
    <h1 style="color:green;">GeeksforGeeks</h1>
    <strong>Foundation CSS Tables</strong>
    <br/><br/>
    <table style="width:90%" class="unstriped">
      <tr>
        <th>Student Name</th>
        <th>Branch</th>
        <th>RollNo</th>
      </tr>
      <tr>
        <td>Ravi</td>
        <td>CSE</td>
        <td>001</td>
      </tr>
      <tr>
        <td>Naveen</td>
        <td>CSE</td>
        <td>002</td>
      </tr>
      <tr>
        <td>Srihita</td>
        <td>ECE</td>
        <td>003</td>
      </tr>
      <tr>
        <td>Aman</td>
        <td>MECH</td>
        <td>004</td>
      </tr>
    </table>
  </center>
</body>
</html>

Output:

Foundation CSS Tables Stripes

Reference: https://get.foundation/sites/docs/table.html


Article Tags :