Open In App

Foundation CSS Tables Basics

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

Foundation CSS is an open-source and responsive front-end framework created by ZURB in September 2011 that makes it simple to create stunning responsive websites, apps, and emails that operate on any device. Many companies, like Facebook, eBay, Mozilla, Adobe, and even Disney, use it. This framework is based on bootstrap, which is similar to SaaS. It’s more complex, versatile, and configurable. It also comes with a command-line interface, making it simple to use with module bundlers. Email framework provides you with responsive HTML emails, which can be read on any device. Foundation for Apps allows you to build fully responsive web applications. Foundation CSS Tables are the arrangement of tabular data in the form of rows and columns. We can easily get any table value using the rows and columns. We can have any type of data in the table such as text, link, image, etc. In this article, we will discuss Tables Basics in Foundation CSS.

Foundation CSS Tables Basics Tags:

  • table: It is used to create the table.
  • thead: It is used to group header content.
  • tbody: It is used to create the body content.

Syntax:

<table>
  <thead>
    ....
  </thead>
  <tbody>
    ....
  </tbody>
</table>

Example 1: The following code demonstrates the Foundation CSS Tables Basics.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <!-- Compressed CSS -->
    <link rel="stylesheet" href=
        crossorigin="anonymous" />
</head>
  
<body>
  <center>
    <h2 style="color: green">
        GeeksforGeeks
    </h2>
      
    <h3>Foundation CSS Tables Basics</h3>
  
    <table>
      <thead>
        <tr>
          <th>GFG Heading 1</th>
          <th>GFG Heading 2</th>
          <th>GFG Heading 3</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>A Computer Science</td>
          <td>programming articles</td>
          <td>Java</td>
        </tr>
        <tr>
          <td>Portal for geeks</td>
          <td>Coding</td>
          <td>computer science</td>
        </tr>
        <tr>
          <td>Javascript</td>
          <td>Web development</td>
          <td>App development</td>
        </tr>
      </tbody>
    </table>
  </center>
</body>
</html>


Output:

Example 2: The following code demonstrates the Foundation CSS Tables Basics using the width attribute.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <!-- Compressed CSS -->
    <link rel="stylesheet" href=
        crossorigin="anonymous" />
</head>
  
<body>
  <center>
    <h2 style="color: green">
        GeeksforGeeks
    </h2>
      
    <h3>Foundation CSS Tables Basics</h3>
  
    <table>
      <thead>
        <tr>
          <th width="300">GFG Heading 1</th>
          <th width="200">GFG Heading 2</th>
          <th width="20">GFG Heading 3</th>
          <th width="100">GFG Heading 4</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>A Computer Science portal for geeks. GeeksforGeeks</td>
          <td>programming articles portal for geeks</td>
          <td>Java</td>
          <td>Flutter</td>
        </tr>
        <tr>
          <td>Portal for geeks</td>
          <td>Coding</td>
          <td>computer science</td>
          <td>GeeksforGeeks</td>
        </tr>
        <tr>
          <td>programming articles portal for geeks</td>
          <td>Web development</td>
          <td>App development</td>
          <td>Coding</td>
        </tr>
      </tbody>
    </table>
  </center>
</body>
</html>


Output:

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



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

Similar Reads