All TalkersCode Topics

Follow TalkersCode On Social Media

devloprr.com - A Social Media Network for developers Join Now ➔

HTML Table No Border

Last Updated : Mar 11, 2024

HTML Table No Border

In this tutorial we will show you the solution of HTML table no border, in HTML we today here show you how you are able to apply no borders in HTML it means that a table is created on webpage but it has no outer border, with no any inner border.

There are many ways with the help of which this can be done. Means it can be done with help of html only and can be done with others without CSS.

Today, we here show you how you are able to done this with the help of html only.

Step By Step Guide On HTML Table No Border :-

As, you know that by default table has no borders. But, if sometime due to some issue table shows border.

Then the method described below can be used. Below, we show you are a code in html in which we create a table without a special attribute or CSS.

And after that we show code of table with its attribute to show you how to make a html table with no border.

<!DOCTYPE html>
      <html>
        <head>
          <title> Title of the document<title>
        <style>
        .table{
   border: none;
  }
    </style>
</head>
<body style="text-align: center;">
   <table class=”table”>
        <tr>
            <th>
                first name
            </th>
            <th>
                last name
            </th>
        </tr>
        <tr>
            <td>
                Robert
            </td>
            <td>
                Shampoo
            </td>
        </tr>
        <tr>
            <td>
                Rock
            </td>
            <td>
                kill
            </td>
        </tr>
    </table>
<!—table without any css/ class or any other -->
    <table>
        <tr>
            <th>
                names
            </th>
            <th>
                initials
            </th>
        </tr>
        <tr>
            <td>
                Robert Shampoo
            </td>
            <td>
                R S
            </td>
        </tr>
        <tr>
            <td>
                Rock kill
            </td>
            <td>
                R K
            </td>
        </tr>
    </table>
</body>
      </html>
  1. First, we write <! DOCTYPE html> which we used as an instruction to the web browser about what version of HTML file is written in.
  2. Secondly, the <html> tag is used to indicate the beginning of an HTML document.
  3. As above now <head> tag is used to contain information about web page. In this tag a <title> tag is used which helps us to specify a webpage title. Both <head> and <title> tags are Paired tags. So, both have </head> and </title> ending tags respectively.
  4. Thirdly, <body> tag is used to define the webpage body. All the contents to show on website are written here.
  5. Here, in body we show you some codes in html. In codes, we create two tables. As you see both are different, because of a class as we specified there.
  6. Now, as given in codes, there in first table we give a class table. And in table we define table border none.
  7. You can also apply no borders on tr, th and td with the help of css. This can be done only if there are borders seen in webpage.
  8. But as we say that by default table has no borders. As you can see in next table, we do nothing only create a table with the help of table, tr, td and th.
  9. And when you see on browser’s screen that there are no borders by default. To apply borders on table, we will create another session.
  10. At last, the <body> and <html> tags are closed with </body> and </html> respectively.

Conclusion :-

In conclusion, here we can say that with the help of this article we are able to create a table in html with no borders. I hope this tutorial on HTML table no border helps you.

Author Image About Ashish

Ashish is a dynamic and motivated individual with a passion of programming and an experienced programmer having 3+ years of experience in various languages like Java, Python, HTML, CSS, JavaScript, jQuery and various frameworks like Bootstrap

Follow Ashish On Linkedin 🡪