Write the HTML code to insert a table.

Q6. Write the HTML code to insert a table that has three columns and four rows.

Ans.

<HTML>

<HEAD>

<TITLE>

</TITLE>

</HEAD>

<BODY>

<TABLE BORDER=1>

<TR>

<TD> A </TD>

<TD> B </TD>

<TD> C </TD>

</TR>

<TR>

<TD> D </TD>

<TD> E </TD>

<TD> F </TD>

</TR>

<TR>

<TD> G </TD>

<TD> H </TD>

<TD> I </TD>

</TR>

<TR>

<TD> J </TD>

<TD> K </TD>

<TD> L </TD>

</TR>

</TABLE>

</BODY>

</HTML>

The output of the above mentioned code is shown Figure 1:

Figure 1: Inserting a Table on a Web Page

Leave a Reply

Your email address will not be published. Required fields are marked *

3 Views
%d bloggers like this: