Create the following table in HTML with Different colors.
It can be used for changing the background colour of the table. By default the background colour is same as of the page colour.
Colspan and Rowspan Attributes
You will use colspan attribute if you want to merge two or more columns into a single column. Similar way you will use rowspan if you want to merge two or more rows.
Create the folloing table in HTML with Different colors.
<!DOCTYPE html> <HTML> <HEAD> <TITLE>CSSimplified.com HTML19</TITLE> </HEAD> <BODY bgColor="yellow" Text="blue"> <TABLE BORDER="1" WIDTH="100%"> <TR> <TD WIDTH="100%" BGCOLOR="white" COLSPAN="3">Color(White)</TR> <TR> <TD WIDTH="33%" bgColor="red">RED</TD> <TD WIDTH="33%" BGCOLOR="green">GREEN</TD> <TD WIDTH="33%" BGCOLOR="black">BLACK</TD> </TR> <TR> </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.
This tag defines the document type and HTML version.
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.
This tag represents the document’s header which can keep other HTML tags like <title>, <link> etc.
<TITLE> CSSimplified.com HTML 19</TITLE>
The <title> tag is used inside the <head> tag to mention the document title.
This tag represents the document’s body which keeps other HTML tags like <h1>, <div>, <p> etc.
The HTML <table> tag is used for defining a table. The table tag contains other tags that define the structure of the table.
The HTML <tr> tag is used for specifying a table row within a table.
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:
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.