How to create tables in HTML?

HTMLWeb DevelopmentFront End Technology

To create table in HTML, use the <table> tag. A table consist of rows and columns, which can be set using one or more <tr>, <th>, and <td> elements. A table row is defined by the <tr> tag. To set table header, use the <th> tag. For a table cell, use the <td> tag.

Just keep in mind, table attributes such as align, bgcolor, border, cellpadding, cellspacing deprecated and isn’t supported by HTML5. Do not use them.


You can try the following code to create a table in HTML. We’re also using the <style> tag to style the table border

Live Demo

<!DOCTYPE html>
         table, th, td {
            border: 1px solid black;

      <h1>Programming Languages</h1>
            <th>Release Year</th>
Published on 01-Feb-2018 11:15:24