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.

Author: Tanmay Chakrabarty

Tanmay Chakrabarty is a former CSE student, currently working as a Senior Software Engineer with 5+ years of experience in the field of Web Application development in PHP+MySQL platform with strong skills in Javascript, JQuery, JQuery UI and CSS. He tries to write notes every week but fails due to heavy loads of duty.

Recommended Recommends

Comments

Contact Us