Computer Science, asked by bhumi1489, 6 months ago

2. Write an HTML program to generate the following output.
COLUMN 1
COLUMN 2
DATA 1
DATA 2
DATA 3
DATA 4
DATA 5
DATA 6
who will answer this question in next 10 mins correctly I will surely mark them as brain list​

Attachments:

Answers

Answered by mohammadfaisalshk0
0

Answer:

The basic structure of an HTML table consists of the following tags:

Table tags: <TABLE> </TABLE>

Row tags: <TR> </TR>

Cell tags: <TD> </TD>

Explanation:

Constructing an HTML table consists of describing the table between the beginning table tag, <TABLE>, and the ending table table tag, </TABLE>. Between these tags, you then construct each row and each cell in the row. To do this, you would first start the row with the beginning row tag, <TR>, and then build the row by creating each cell with the beginning cell tag, <TD>, adding the data for that cell, and then closing the cell with the ending cell tag, </TD>. When you finish all of the cells for a row, you would then close the row with the ending row tag, </TR>.Then, for each new row, you would repeat the process of beginning the row, building each cell in the row, and closing the row.

The following table is an example of a basic table with three rows and two columns of data.

Data 1 Data 2

Data 3 Data 4

Data 5 Data 6

The codes that generated this table look like this:

<TABLE>

<TR>

<TD>Data 1</TD>

<TD>Data 2</TD>

</TR>

<TR>

<TD>Data 3</TD>

<TD>Data 4</TD>

</TR>

<TR>

<TD>Data 5</TD>

<TD>Data 6</TD>

</TR>

</TABLE>

This table contains no border, title, or headings. If you wish to add any of these elements to your table, you need to include additional HTML codes. The codes for these elements are explained in the next section.

Answered by vedikasoni26jul2009
0

Answer:

The HTML tables allow web authors to arrange data like text, images, links, other tables, etc. into rows and columns of cells.

The HTML tables are created using the <table> tag in which the <tr> tag is used to create table rows and <td> tag is used to create data cells. The elements under <td> are regular and left aligned by default

Example -

<!DOCTYPE html>

<html>

  <head>

     <title>HTML Tables</title>

  </head>

 

  <body>

     <table border = "1">

        <tr>

           <td>Row 1, Column 1</td>

           <td>Row 1, Column 2</td>

        </tr>

         

        <tr>

           <td>Row 2, Column 1</td>

           <td>Row 2, Column 2</td>

        </tr>

     </table>

     

  </body>

</html>

This will produce the following result −

Row 1, Column 1 Row 1, Column 2

Row 2, Column 1 Row 2, Column 2

Explanation:

Similar questions