Welcome to Interactive Programming Forums, where you can ask questions, receive answers from other members of the community, post code snippets and post exercies.

Trouble with a html exercise (SOLVED)

+10 votes
Found help on the forums (should have checked them before posting - sorry).

It's in the HTML tutorial 2 - 2 of 10


Instructions:
HTML tables: <th></th> - header tag

Example:
<html>
<head>
<title></title>
</head>
<body>
<table border="1">
<tr>
<th>header</th>
</tr>
<tr>
<td>cell 1</td>
</tr>
</table>
</body>
</html>

Create one 2 x 2 table that includes a table header for each column

My solution:
<html>
<head>
<title></title>
</head>
<body>

<table>
<tr>
<th>header</th>
<th>header</th>
</tr>
<tr>
<td>1 x 1</td>
<td>1 x 2</td>
</tr>
<tr>
<td>2 x 1</td>
<td>2 x 2</td>
</tr>
</table>

</body>
</html>

Could anyone help me please, I'm stuck. Thanks :)
posted 5 years ago in HTML by Sigurður Jónsson (6,630 points)
edited 5 years ago by Sigurður Jónsson

1 Answer

0 votes
There is a problem with the starting tag 'table'
u should write this

<table border = "1">
.
.
.
</table>
answered 5 years ago by waseem.shah20 (1,350 points)

Related questions

0 votes
0 answers
posted 3 years ago in HTML by sdubois (8,090 points)
+10 votes
1 answer
posted 5 years ago in HTML by Milad1991 (2,750 points)
+2 votes
1 answer
posted 5 years ago in HTML by Matthew Tembo (6,610 points)
+2 votes
1 answer
posted 5 years ago in HTML by waseem.shah20 (1,350 points)
+17 votes
1 answer
posted 5 years ago in HTML by team.kurt1 (1,120 points)