Explanation

  • The <table border="1"> element creates a table with a border width of 1 pixel.
  • The <tr> elements define the table rows.
  • The <th> elements are used for table headers, and the <td> elements are used for table data.
  • The borders are applied to the entire table, including the cells.


How to Create Table in HTML with Border without CSS ?

Creating a table in HTML is a fundamental skill for web developers. Tables are used to organize data in a grid-like structure, making it easier to read and understand. In this article, we will learn how to create a simple table in HTML with borders, without using CSS styling.

Similar Reads

Step 1: Basic Table Structure

The basic structure of an HTML table consists of the

element, which contains rows ( elements), and each row contains cells (
elements for data cells or elements for header cells)....

Step 2: Adding Borders to the Table

...

Complete Code Example

To add borders to the table without using CSS, we can use the border attribute directly in the

tag. The border attribute specifies the width of the border in pixels....

Explanation

Here’s a complete HTML example with a table that has borders:...