Vertical Table Headers in Punjabi | Table Headers | HTML Tutorials | Online HTML Editor on July 09, 2023 Get link Facebook X Pinterest Email Other Apps To use the first column as table headers, define the first cell in each row as a <th> element: <!DOCTYPE html> <html> <head> <title>Vertical Table Headers</title> </head> <body> <h2>Vertical Table Headers</h2> <p>The first column becomes table headers if you set the first table cell in each table row to a TH element:</p> <table style="width:100%"> <tr> <th>Firstname</th> <td>Taranpreet</td> <td>Mehakpreet</td> </tr> <tr> <th>Lastname</th> <td>Singh</td> <td>Kaur</td> </tr> <tr> <th>Class</th> <td>6th</td> <td>7th</td> </tr> </table> </body> </html> table, th, td { border:1px solid black; border-collapse: collapse; } Live Demo & Try it yourself! Comments
Comments
Post a Comment