![]() |
VOOZH | about |
Introduction: Before starting with Pure we must know the basics of plain CSS. Basically, Pure CSS is a Cascading Style Sheet framework developed by YAHOO. The main reason for developing Pure CSS is used to develop responsive and reactive websites like Bootstrap which is also compatible with mobile devices and it is an open-source CSS framework and free to use. It can be the best alternative to Materialize CSS.
In this article, we will understand what is Pure CSS Table is? and learn how to use it in our project.
As we think of creating web pages, we know that tables are a nice and easy way to organize a lot of data in websites into the form of rows and columns. By using the Pure CSS framework, we will be able to design different types of tables.
Pure CSS provides a number of utility classes to style tables, there basically 5 main classes as listed below:
Examples: Now here we learn how to use table classes in HTML.
1. Default Table: The pure-table class is used in <table> tag to create a basic table with some basic CSS styling, these tables are just like the normal HTML tables with some padding and border added to table elements with the header.
Output:
👁 Image2. Bordered Table: Here we use the pure-table-bordered class is used to create a bordered table. This class will add vertical and horizontal borders to all the cells of the table.
Output:
👁 Image3. Table with Horizontal Borders: Here we used the pure-table-horizontal class to create this type of table. This will create a table with horizontal lines only.
Output:
👁 Image4. Striped Table: For better visualization of large-size tables we can use striped cells. For a striped table here we used the pure-table-odd Pure CSS class in the every <tr> element tag to change the background of the odd rows. This will create a striped table with the zebra-styled effect which is more visible and attractive for a large number of data to the user.
Output:
👁 ImageIn this article, we learn what is Pure CSS Table is, its classes, and how to use it in various tables.