Remember: it's better with a header


#1

i'm stuck on this lesson (i'm stuck a lot)

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css" />
		<title>My Photo Page</title>
	</head>
	<body>
	<table>
	  <thead>
	    <th>horses</th>
	  </thead>
	    <tbody>
	      <tr>
	      <td>
	        horse
	      </td>
	      <td>
	      horse
	      </td>
	      <td>
	      horse
	      </td>
	      <tr>
	      <tr>
	      <td>
	        horse
	      </td>
	      <td>
	      horse
	      </td>
	      <td>
	      horse
	      </td>
	      </tr>
	      <tr>
	      <td>
	        horse
	      </td>
	      <td>
	      horse
	      </td>
	      <td>
	      horse
	      </td>
	      </tr>
	    <tbody>
	<table>
	</body>
</html>

i need to have a 3x3 table but if i don't put a word inside of it becomes smaller and also, how do i set the colspan for the header to 3?


#2

@redhood09,

IMHO:: The thing about HTML-table definition
to remember is that to create a Table-Row you Always use

<tbody>
     <tr><td>cel1</td><td>cel2</td></tr> 
</tbody>
 <tfoot>
     <tr><td>cel1</td><td>cel2</td></tr>
  </tfoot>

with the EXCEPTION in the Table-Header defintion where you use < th> cel1 < /th>
like your

  <thead>
    <th>horses</th> /*only 1 cell */
  </thead>

The colspan is a so-called attribute which you place inside you < thead>
like

  <thead colspan="3">
     <th>This cell will span over 3</th> /* if you used EXCEL you would select-3-cells &&then joined */
  </thead>

But remember a < table> Always end with a < /table>-Tag ( look in your code )

Have a read
= https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table
and also look in the left-hand-column for more specifity aboot the thead-Tag