HTML
Tag


The center tag in HTML is used to center align text.

Note: The <center> tag isn’t supported in HTML5. CSS usage is suggested.

Let us now see an example to implement the center tag in HTML −

Example

 Live Demo

<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
   border: 2px solid blue;
}
</style>
</head>
<body>
<table>
   <center>Table to calculate the budget</center>
   <caption>Expenses</caption>
   <tr>
      <th>Domains</th>
      <th>Cost</th>
   </tr>
   <tr>
      <td>Product Development</td>
      <td>500000</td>
   </tr>
   <tr>
      <td>Marketing</td>
      <td>500000</td>
   </tr>
   <tr>
      <td>Services</td>
      <td>100000</td>
   </tr>
   <tr>
      <td>Support</td>
      <td>100000</td>
   </tr>
   <tr>
      <td>Maintenance</td>
      <td>100000</td>
   </tr>
   <tr>
      <td colspan="2">Total Budget = INR 1300000</td>
   </tr>
</table>
</body>
</html>

Output

Updated on: 30-Jul-2019

40 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements