how to remove rows from a table?

Asked

Viewed 542 times

1

I’m creating a table, but on the site always appear the lines that separate the columns and rows. Can someone tell me how I could do to get them out?

The code I have is this:

<table>
   <tbody>

      <tr>
          <td bgcolor="white" width="175">Lorem ipsum dolor sit amet</td>
          <td bgcolor="white" width="25"></td>
          <td bgcolor="white">Lorem ipsum dolor sit amet,
          </td>
      </tr>
      <tr>

          <td bgcolor="white">Lorem ipsum dolor sit amet</td>
          <td bgcolor="white" width="25"></td>
          <<td bgcolor="white">Lorem ipsum dolor sit amet,</td>
      </tr>

      <tr>
          <td bgcolor="white">Lorem ipsum dolor sit amet</td>
          <td bgcolor="white" width="25"></td>
          <td bgcolor="white">Lorem ipsum dolor sit amet,
          </td>
      </tr>

   </tbody>
</table>

  • In its second line, in the last column, there is <<td. Please confirm that this was not a typo in the question or if your code is the same. This breaks the HTML syntax.

  • 1

    Your table is already without the lines!! Just got a bug like Anderson said.

2 answers

2

Just remove the edges via css and by attributes cellpadding and cellspacing

body {
  background-color: grey;
}

table {
  border: none;
}
<h1> Atributos zerados</h1>
<table cellpadding="0" cellspacing="0">
  <tbody>

    <tr>
      <td bgcolor="white" width="175">Lorem ipsum dolor sit amet</td>
      <td bgcolor="white" width="25"></td>
      <td bgcolor="white">Lorem ipsum dolor sit amet,
      </td>
    </tr>
    <tr>

      <td bgcolor="white">Lorem ipsum dolor sit amet</td>
      <td bgcolor="white" width="25"></td>
      <td bgcolor="white">Lorem ipsum dolor sit amet,</td>
    </tr>

    <tr>
      <td bgcolor="white">Lorem ipsum dolor sit amet</td>
      <td bgcolor="white" width="25"></td>
      <td bgcolor="white">Lorem ipsum dolor sit amet,</td>
    </tr>
  </tbody>
</table>

<h1> Apresentação default </h1>
<table>
  <tbody>

    <tr>
      <td bgcolor="white" width="175">Lorem ipsum dolor sit amet</td>
      <td bgcolor="white" width="25"></td>
      <td bgcolor="white">Lorem ipsum dolor sit amet,
      </td>
    </tr>
    <tr>

      <td bgcolor="white">Lorem ipsum dolor sit amet</td>
      <td bgcolor="white" width="25"></td>
      <td bgcolor="white">Lorem ipsum dolor sit amet,</td>
    </tr>

    <tr>
      <td bgcolor="white">Lorem ipsum dolor sit amet</td>
      <td bgcolor="white" width="25"></td>
      <td bgcolor="white">Lorem ipsum dolor sit amet,</td>
    </tr>
  </tbody>
</table>

1

in which case you can add a CSS style to the tag <table>, as below:

<table style="border:0;">

This is the most current solution, but you can also put the attribute border="0" on the tag:

<table border="0">

Browser other questions tagged

You are not signed in. Login or sign up in order to post.