Prev Demo
Table Hover
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <style> table, td, th { border: 1px solid black; } table { border-collapse: collapse; width: 50%; } td { height: 50px; } tr:hover{ background-color:magenta; } </style> </head> <body> <h2>Table with Hover</h2> <table> <tr> <th>HYDERABAD</th> <th>RANGAREDDY</th> <th>HYDERABAD</th> </tr> <tr> <td style="vertical-align:top">STATE</td> <td style="vertical-align:bottom">DISTRICT</td> <td style="vertical-align:top">CITY</td> </tr> <tr> <td>HITECHCITY</td> <td>GOLCONDA</td> <td>CHARMINAR</td> </tr> </table> </body> </html>
Note: We DO NOT save your trial code in our database.
Output