HTML Basics-The table Tag, attributes used with examples, purpose and usage of tables - HTMl tables are very important and are widely used now a days. The HTML tags <table>, <TH>, <TR>, <TD> and a number of attributes are used. A web page can be divided into sections with the help of table and all the websites use this powerful tool as invisibles tables to layout their web pages. These tags can simply be added where a table is to be displayed.
HTML TABLES |
Usage and purpose of table or the table tags
There are two major purposes of using the tables or the table tags in a web page. (1) To arrange the information in a table on a web page is the more obvious purpose and (2) Use of the hidden or invisible tables while creating a page layout is less obvious but widely used purpose.
You may like to read on - A stepby step Guide to setup or configure your WI-FI modem on a broadband connection
HTML Tags used in creating a table
<TABLE> - Opening or starting tag.
</TABLE> - Closing or ending tag.
<TR>(Table Rows) - Opening or starting tag to create row. Used to divide the table into rows
</TR>(Table Rows - Closing or ending tag to create row. Used to divide the table into rows
<TH>(Table Heading) - Opening or starting tag defines a cell that is header of a group of cells in a table.
</TH>(Table Heading) - Closing or ending tag defines a cell that is header of a group of cells in a table.
<TD>(Table Data) - Opening or starting tag of a cell of the table that contains data.
</TD>(Table Data) - Closing or ending tag of a cell of the table that contains data.
Attributes used with table tag<TABLE>
SN
|
Attribute
|
Permitted Value
|
Usage
|
1
|
Bgcolor
|
rgb(?, ?, ?)
#??????(6 figure color code)
|
Used to define the back ground color. (HTML5 does not
support)
|
2
|
cellpading
|
pixels
|
Defines the space between the wall and the table contents. (HTML5 does
not support)
|
3
|
align
|
left
right
centre
|
Defines the alignment of a table(HTML5 does not support)
|
4
|
border
|
1
0
|
Defines borders of a table. (HTML5 does not support)
|
5
|
frame
|
void
above
hsides
lhs
rhs
vsides
box
border
|
Used to define the sides of a table’s outside border to
be visible. (HTML5 does not support)
|
6
|
cellspecing
|
pixels
|
Used to define space between cells of a table. (HTML5 does not support)
|
7
|
sortable
|
sortable
|
Used to define the table is sortable
|
8
|
rules
|
all
none
groups
rows
cols
|
Used to define the sides of a table’s inside border to be visible.
(HTML5 does not support)
|
9
|
width
|
Pixel
%
|
Used to define the width of a table(HTML5 does not
support)
|
10
|
summary
|
text
|
Used to define summary of the table contents(HTML5 does not support)
|
YOU MAY LIKE TO READ ON - Lightning strikes: how dangerous isit safety measures All you need to know about the phenomenon
<HTML>
<HEAD>
<TITLE>Monthly account</TITLE>
</HEAD>
<BODY>
<H1 Align=”left”>Employees Accounts</H1>
<TABLE Align=”CENTRE” border=”1” height=”100” width=150 cellspecing=”5” cellpadding=”8”>
<TR>
<TD>SN</TD>
<TD>Employee Name</TD>
<TD>Salary in INR</TD>
<TD>Bank Details</TD>
</TR>
<TR>
<TD>1</TD>
<TD>Lekh Raj Gaur</TD>
<TD>46917</TD>
<TD>SBI</TD>
</TR>
<TR>
<TD>2</TD>
<TD>Carlos Cleetus</TD>
<TD>45628</TD>
<TD>PNB</TD>
</TR>
</TABLE>
<BODY>
</HTML>
The result will be-
Employees Accounts
SN
|
Employee Name
|
Salary in INR
|
Bank Details
|
1
|
Lekh Raj Gaur
|
46917
|
SBI
|
2
|
Carlos Cleetus
|
45628
|
PNB
|
table border in html, how to create table in html, html table border color, td> tag in html, table tag in html, html table style, html table border style, What is the purpose of using table in HTML, What are the attributes of table tags in HTML, create a table in html with 3 rows and 4 columns, What is the use of tables in HTML which tag enables you to add a table in a web page, What are attributes and how do you use them explain with example code
भैया मैंने आपको एक मेल भेजा है। जिसमें कई सवाल हैं। अच्छी तरह पढ़कर उत्तर देने का कष्ट करें। आपकी पोस्ट काफी अच्छी है। इससे एचटी एम एल लैंग्वेज समझने में मदद मिलेगी।
जवाब देंहटाएंKahakashan didi thans a lot of your valuable comment.
हटाएं