Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide columns in HTML table?

I have created a table in ASPX. I want to hide one of the columns based on the requirement but there is no attribute like visible in the HTML table building. How can I solve my problem?

like image 568
user601367 Avatar asked Mar 26 '11 06:03

user601367


People also ask

How do I hide a column in a html table?

To hide a column entirely from view, meaning it will not be displayed in either the normal or details row, simply use the visible column option and set it to false . This example shows a table where the first column ID is completely hidden from view using the data-visible column attribute.

How do I hide columns in a table?

To hide individual columns, open the table for which you are hiding a column, right-click the column, and click Hide from Client Tools. You can hide multiple columns at a time by holding down the Ctrl key or the Shift key.

How do you hide cells in a table html?

You can hide cells using visibility: hidden . A side note, learn about html table elements such as thead , tbody and th . They will help structure your table with greater semantic meaning.


1 Answers

You need to use Style Sheet for this purpose.

<td style="display:none;"> 
like image 74
Anuraj Avatar answered Sep 30 '22 09:09

Anuraj