HTML17 Create a Web page, which should contain a table having two rows and two columns fill in some dummy data in the table created

By | April 13, 2018

Create a Web page, which should contain a table having two rows and two columns fill in some dummy data in the table created.

 

Table, TR and TD Tags

Three tags form the essential ingredients for creating a table.

TABLE: This is the main tag. It tells the browser that a table follows. It has attributes like size and border width.

TR: A TableRow defines a horizontal row that consists of TableData cells.

TD: This tag specifies an individual block or cell in a table row.

Thus a table is made up of rows, which in turn are made up of cells.

HTML_Table_2_Rows_2_Columns_with_Data_PageHTML_Table_2_Rows_2_Columns_with_Data_Source_Code

 

Create a Web page, which should contain a table having two rows and two columns fill in some dummy data in the table created.

 

Html code:

<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>CSSimplified.com HTML17</TITLE>
</HEAD>
<BODY bgColor="yellow" Text="blue">
<BODY>
<TABLE BORDER="2" WIDTH="100%">
<TR>
<TD WIDTH="50%">Name</TD>
<TD WIDTH="50%">GANGADHAR</TD>
</TR>
<TR>
<TD WIDTH="50%">Age</TD>
<TD WIDTH="50%">24 yrs</TD>
</TR>
</TABLE>
</BODY>
</HTML>

Write above code in any text editor and save by htm or html extension and Open it in any browser by double clicking the file like internet explorer.

 

<!DOCTYPE html>

This tag defines the document type and HTML version.

 

<HTML>…</HTML>

This tag encloses the complete HTML document and mainly comprises of document header which is represented by <head>…</head> and document body which is represented by <body>…</body> tags.

 

<HEAD>…</HEAD>

This tag represents the document’s header which can keep other HTML tags like <title>, <link> etc.

 

<TITLE> CSSimplified.com HTML 17</TITLE>

The <title> tag is used inside the <head> tag to mention the document title.

 

<BODY>…</BODY>

This tag represents the document’s body which keeps other HTML tags like <h1>, <div>, <p> etc.

 

<TABLE>

The HTML <table> tag is used for defining a table. The table tag contains other tags that define the structure of the table.

 

<TR>

The HTML <tr> tag is used for specifying a table row within a table.

 

<TD>

The HTML <td> tag is used for specifying a cell or table data within a table.

 

The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration tag is used by the web browser to understand the version of the HTML used in the document. Current version of HTML is 5 and it makes use of the following declaration:

<!DOCTYPE html>

There are many other declaration types which can be used in HTML document depending on what version of HTML is being used. We will see more details on this while discussing <!DOCTYPE…> tag along with other HTML tags.

Note:- To understand program for sequence in detail Please SEARCH numerically example: HTML01, HTML02, etc.