Create table without border

Asked

Viewed 517 times

-3

You can create an HTML5 table without black border lines or change the line color to white.

 <center><table width="500px" height="600px">
 <tr >
 <td>
 <iframe   ></iframe>
 </td>
 </tr>
 <tr>
 <td>
 <iframe  ></iframe>
 </td>
 </tr>
  </table></center>

I tried to put the Bordercolor.

  • 3

    -1, just for not submitting research effort

  • 2

    I reversed your edit because you completely changed the question. Post a separate question about how to affect only the desired elements with CSS.

  • do you want me to ask a new question? Or continue with this?

  • Make a new one. Or do a search for the basics of CSS.

3 answers

4

It’s quite simple, there is an attribute for this (you need to search for documentation to see everything that exists in each element) although it is recommended not to use it anymore. I will use an example that uses the attribute to follow the style you are using, but your HTML is well outside of what is used today. tags as <center> should not be used either, the use of <iframe> which should also be avoided seems to be being misused as well. Another problem is that something tells me that you are using the tag to compose layout when it was made only to create tables as its name says.

<table border=0>

Documentation of <table>.

Note that it can be obtained more appropriately with CSS:

#tabela {
    border: 0px;
    margin: 0px auto;
    width: 500px;
    height: 600px;
}
<table id="tabela">
    <tr>
        <td>
            texto1
        </td>
    </tr>
    <tr>
        <td>
            texto2
        </td>
    </tr>
</table>

I put in the Github for future reference.

  • I sincerely hope he listens to your advice.

  • Something tells me he didn’t even read the answer. When you find the bordercolor and not the border, it must be hard to find an answer that was posted after :)

3


 <table border="0">

Or in the CSS:

table {
    border: 0;
}

0

I would make a CSS class:

.table{border:none;}
  • If you prefer all tables to be border:name; eh so declare table without "." Because it will no longer be class.. An analogy would be to say that it would be like a constant in programming language ..

  • Tomaz, I think that answer looks better on the other question that the same user just asked. That he had changed and I undone, because it invalidated the two answers that already existed.

  • OK, first I was typing from a mobile device, so that’s obviously not name, but None. and yes I use a class for this, because each one has its way of doing the service, it is a question of choice of the person

Browser other questions tagged

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