Prev Demo
Text Align
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: 100%; } th { height: 80%; text-align:center } </style> </head> <body> <h2>Text align</h2> <table> <tr> <th>PRESIDENT</th> <th>PRIME MINISTER</th> <th>CHEIF MINISTER</th> </tr> <tr> <td style="text-align:left">Pranab Mukherjee</td> <td style="text-align:center">NARENDRA MODI</td> <td style="text-align:right">CHANDRA BABAU NAIDU</td> </tr> <tr> <td style="text-align:center">DELHI</td> <td>DELHI</td> <td>ANDHRA PRADESH</td> </tr> </table> </body> </html>
Note: We DO NOT save your trial code in our database.
Output