Practicing HTML Tables I am trying to learn by doing. Here is the first problem that I have solved. I have actually not done it perfectly. The table header should cover both the text and the image but it is only above text. If you can help me out with the design I will be thankful.

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;table&gt;
        &lt;th &gt;&lt;h3&gt;Food you love to eat&lt;/h3&gt;&lt;/th&gt;
        &lt;tr&gt; 
                &lt;td&gt;I love eating food . All types of food are good for health. I like fruits in them. Fruits are good for health.&lt;/td&gt;
                &lt;td width="170"&gt; &lt;img src ="http://www.htmliseasy.com/exercises/fruitbowl.gif" /&gt; &lt;/td&gt;
        &lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;
The HTML you submitted was invalid. I changed the following things so your html would be valid:


Don't put &lt;h3&gt; tags inside a table. Header tags are used for headings only. Don't use headings to make text BIG or bold. Use CSS for positioning and font sizing.
In a table, the &lt;tr&gt; tag is the first tag that should appear.
In the &lt;img&gt; tag, the attribute alt is required. The alt attribute specifies alternate text for an image if the image cannot be displayed.


Your HTML validated:

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
    &lt;h3&gt;Food you love to eat&lt;/h3&gt;
&lt;table&gt;
        &lt;tr&gt; 
                &lt;td&gt;I love eating food . All types of food are good for health. I like fruits in them. Fruits are good for health.&lt;/td&gt;
                &lt;td width="170"&gt; &lt;img src ="http://www.htmliseasy.com/exercises/fruitbowl.gif" alt="Fruit Bowl" /&gt; &lt;/td&gt;
        &lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;