Table tag in html is the important part in HTML.In this post we will learn what is table tag in html and attributes of table tag in html.
1.WIDTH:
This attribute is used to specify the width of the table and it is specified in terms of pixels.
Example:
<table width="5"> or <table width="50%">
2.ALIGN:
This attribute is used to specify the horizontal alignment of the table.
Example:
<table align="right">
<table align="left">
What is table tag in html:
- Table tag is used to create a table in html.
- Table tag is a paired tag that start with <TABLE> and </TABLE>.
- Table tag in html start with <TABLE> and end with </TABLE>
- Table tag in html display the data in a table format instead of paragraph or other block level structure.
- With the help of table tag in html we can show data in the rows and columns.
- When the data is displayed in rows and columns it is easy to read.
Attributes of table tag :
Following are the attributes of table tag in html.1.WIDTH:
This attribute is used to specify the width of the table and it is specified in terms of pixels.
Example:
<table width="5"> or <table width="50%">
2.ALIGN:
This attribute is used to specify the horizontal alignment of the table.
Example:
<table align="right">
<table align="left">
<table align="center">
3.BORDER:
This attribute is used to specify the border of the table.By default there is no border to the table.
Example:
<table border="2">
4.BORDER COLOR:
This attribute is used to specify the color to the border to the table.
3.BORDER:
This attribute is used to specify the border of the table.By default there is no border to the table.
Example:
<table border="2">
4.BORDER COLOR:
This attribute is used to specify the color to the border to the table.
Example:
<table border color="red">
5.BORDERCOLORDARK:
This attribute is used to apply dark color to the border.
Example:
<table bordercolordark="blue">
6.BORDERCOLORLIGHT:
This attribute is used to apply the light color to the border.
Example:
<table bordercolorlight="blue">
7.BGCOLOR:
This attribute is used to apply the background color of the table.
Example:
<table bgcolor="magenta">
8.BACKGROUND:
This attribute is used for displaying image as a background of table.
Example:
<table background="c:\pic.jpg">
9.CELLSPACING:
This attribute is used to provide the space between the cells of the table.It is in terms of pixels.
Example:
<table cellspacing="50">
10.CELLPADDING:
This attribute is used to provide the distance between the cell border and the cell data.
Example:
<table cellpadding="1">
I hope you will understand what is table tag in html.and in the next post we will learn how to use table tag in html and how to create table in html.
0 comments:
Post a Comment