VOOZH about

URL: https://www.geeksforgeeks.org/css/pure-css-table-with-horizontal-borders/

⇱ Pure CSS Table with Horizontal Borders - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Pure CSS Table with Horizontal Borders

Last Updated : 30 Jan, 2022

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. In Pure CSS, we will add a "pure-table" class to add styles to the table. This class adds padding and borders to table elements and emphasizes the header.

A table with Horizontal Borders is a table that has only a horizontal border. To make the horizontal bordered table, we will add the "pure-table-horizontal" class.

Pure CSS Table with Horizontal Borders Class:

  • pure-table-horizontal: This class is used to create the horizontal bordered table. This class is used with a pure-table class.

Syntax:

<table class="pure-table pure-table-horizontal">
 <thead>
 // Table heading content
 </thead>
 <tbody>
 // Table body content
 </tbody>
</table>

Example:

Output:

👁 Pure CSS Table with Horizontal Borders
Pure CSS Table with Horizontal Borders
Comment
Article Tags: