Creating table coloumns


#1


https://www.codecademy.com/courses/web-beginner-en-f8mcL/0/5?curriculum_id=50579fb998b470000202dc8b


There is a thing I don't understand. In the exercise preceding this one, the cells were added vertically, going under each other with every added td tag but in this one, the cells go horizontally, beside each other, even though we're still inside the same td tag. I get that we used multiple td tags to create coloumns but isn't it supposed to go vertically automatically (like the previous exercise) and then we add another tag to add a horizontal data not the other way around? Is there a consistent way of how cells add up as in vertically or horizontally? (mind that I'm discussing the data put inside the same td tags)

Replace this line with your code.


#2

@sarahsam,

You have to understand
that if you use <tr></tr>
you are defining a so-called table-ROW

With

<tr> </tr>
<tr> </tr>
<tr> </tr>

you define 3 table-ROW's

-------------------------------------
table-ROW
-------------------------------------
table-ROW
-------------------------------------
table-ROW
-------------------------------------

Within each table-ROW
you can define the table-CELL's using the <td></td> Tags

Thus if you define

<tr><td></td> </tr>
<tr><td></td> </tr>
<tr><td></td> </tr>

you will have 3 table-ROW's each having 1 table-CELL

+------------+
| table-Cell |
+------------+
| table-Cell |
+------------+
| table-Cell |
+------------+

Please read
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.