Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Tables Rows and Cells

Patrick Cole
Patrick Cole
5,189 Points

My table is displaying data horizontally rather than vertically as in the video.

Just wondering why.

Hey Patrick, can you post your code?

1 Answer

Jessica H
Jessica H
16,612 Points

Its because you are listing them all under Table head probably. (th) Make sure you close table head. Then open up another tag:

Table row (tr). inside table row will be another tag called - table data (td) close td and close tr.

<thead>
<th>fruits</th>
<th>country</th>
</thead>

<tr>
  <td>mango</td>
 <td>japan</td>
</tr>