HTML | Tags and Attributes [TABLE] [Basic Tags]




Look at the following table first,

| Basic Table Tags
Tag
Use
<TABLE>
Use to form tables.
<TR>
Use to create a row in a table.
<TD>
Each <TD> under a <TR> creates a cell in a row.
<TH>
Marks a heading cell within a row
From this chart we can understand the tags. Now using these tags we will create a simple table. Follow the following input and its output
.
Input :
<HTML><HEAD><TITLE>TABLE</TITLE></HEAD>
<BODY>
A simple table.<BR><BR>
<TABLE>
<TR>
<TH>COURSE
<TH>GRADE
</TR>
<TR>
<TD>PHYSICS II
<TD>A+
</TR>
<TR>
<TD>ENGLISH I
<TD>A+
</TR>
</TABLE></BODY></HTML>
Output: 





Ü To give borders, use the BORDER attribute in the <TABLE> tag as following,
          <TABLE BRODER=”1”>
The more value of the BORDER attributes results in much width of the border.

Recommended Recommends

Comments

Contact Us