0
What am i doing wrong? I want the colors to be in rows within the table. I got them into rows, but now my table has disappeared.
3 Antworten
+ 1
You have to add "td" tag in order to create a table otherwise table won't be created!!
By the way, do you want something just like this?
https://code.sololearn.com/WqkkJGeztXes/?ref=app
+ 5
**Revised Answer**
HTML tables display content wrapped within table data <td> tags, which are wrapped within table row <tr> tags, which are wrapped within <table> tags.
Your table has the content wrapped within <tr> tags without the <td> tags.
Consider the following comparisons:
Rectangles and table data are similar in that both require 2 dimensions to exist.
For rectangles, if either the width or height is missing, the rectangle is just a line length with no area.
Likewise, without the intersection of at least one row and at least one column, the table cannot be defined.
For a better analogy, consider the (x, y) coordinates on a map. The grid system is similar to a table.
Just as the intersection of x and y are required for a location, the intersection of a row and a column are required for table data.
+ 2
Do you want something like this?
<tr>
<td>Red</td>
</tr>
<tr>
<td>Blue</td>
</tr>
<tr>
<td>Green</td>
</tr>