Interactive Programming Forums
Login
Register
Home
Questions/Snippets/Exercises
Unanswered
Tags
Ask a Question
Post a Code Snippet
Post an Exercise
Welcome to Interactive Programming Forums, where you can ask questions, receive answers from other members of the community, post code snippets and post exercies.
All categories
Ruby
(3)
Python
(10)
PHP
(7)
Perl
(2)
SQL
(8)
Javascript
(6)
HTML
(20)
CSS
(4)
jQuery
(0)
XML
(3)
Code Snippets
(1)
Exercises
(4)
Other
(9)
Problem Making A Table
+17
votes
I am trying to make a table in HTML II I try many ways to get around it but to no avail, could someone please help:
"Create one 2 x 2 table that includes a table header for each column"
At first I tried doing this:
<html>
<head>
<title></title>
</head>
<body>
<table border="1">
<tr>
<th>Header 1</th>
<td>1 x 1</td>
<td>1 x 2</td>
</tr>
<tr>
<th>Header 2</th>
<td>2 x 1</td>
<td>2 x 2</td>
</table>
</body>
</html>
With no luck, I tried this next :
<html>
<head>
<title></title>
</head>
<body>
<table border="1">
<tr>
<th>Header 1</th>
<th>Header 2</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>
programming
html
table
problem
posted
12 years
ago
in
HTML
by
team.kurt1
(
1,120
points)
1 Answer
+2
votes
Hi,
The table header is already a row with two columns so simply create one more row with two columns will make a 2 x 2 table.
Please see below example:
<html>
<head>
<title></title>
</head>
<body>
<table border="1">
<tr>
<th>Header (1x1)</th>
<th>Header (1x2)</th>
</tr>
<tr>
<td>2x1</td>
<td>2x2</td>
</tr>
</table>
</body>
</html>
answered
12 years
ago
by
codeadmin
(
113,880
points)
Thanks guys!
Related questions
+2
votes
1
answer
Having Problem in HTML Tutorial 3 Last Excercise.
posted
12 years
ago
in
HTML
by
waseem.shah20
(
1,350
points)
html
error
programming
+11
votes
1
answer
How to understand easily the terms of your exercises as a new student who had not such kind of knowledge before?
posted
12 years
ago
in
Exercises
by
chanmg84
(
1,860
points)
programming-code
programming
html
php
0
votes
0
answers
HTML II Last Exercise Issue
posted
10 years
ago
in
HTML
by
sdubois
(
8,090
points)
html
programming
error
+10
votes
1
answer
in html 2,exercise 5 i have problem please F1
posted
12 years
ago
in
HTML
by
Milad1991
(
2,750
points)
html
+10
votes
1
answer
Trouble with a html exercise (SOLVED)
posted
12 years
ago
in
HTML
by
Sigurður Jónsson
(
6,630
points)
html