Welcome to Smarter QA, Questions, Answers Community
Welcome to Smarter QA, where you can ask questions and receive answers from other members of the community. Ask anything that you want. Guests Posting are allowed.
+2 votes
28 views
asked in HTML by (1.1k points)

1 Answer

0 votes

Responsive HTML table -

HTML is used to create a table but not responsive. The responsive table is created by the HTML and CSS. If you have to create a responsive table, you will have to do it and make sure. Responsible tables were such a table that can easily open any device. As you know, Without CSS we can not design any table or website. Therefore, in order to make the table responsive. Table creates and designs are made by HTML and CSS.  

<style>

table {

    border-collapse: collapse;

    border-spacing: 0;

    width: 100%;

    border: 1px solid #ddd;

}

th, td {

    text-align: left;

    padding: 8px;

}

tr:nth-child(even){background-color: #E6DEDC}

</style>

There are two ways to make a responsive table

 1.Responsive HTML table using CSS -

You can also make HTML table a responsive even after using a simple CSS 

HTML responsive table

 2. HTML responsive table using Bootstrap

If you are using Bootstrap, you can also create a Responsive HTML table for by using the Bootstrap table class.

As you know that bootstrap helps to create a responsive website using bootstrap class. 

You have to download the bootstrap and save on your server .after that you have to link all bootstrap files. 

Bootstrap included a lot of classes that are used to make responsive the website. You can use that classed to make your website responsive. Bootstrap contains the Table class that is used to design and make an HTML table responsive 

Responsive HTML table using Bootstrap

answered by (800 points)
...