Recent

6/recent/ticker-posts

How can we learn HTML code for any table or webpage?

  Learn HTML code for any table or webpage




TABLES


It allows to arrange the data in the form of rows and columns of the cells.

TAGS OF TABLES


1.<table> = Define a table
2.<tr> = Defines table Row
3.<th> = Defines table Header
4.<td> = Defines table Data
5.<caption> = Defines Title or Caption

Simple Example ↓↓↓↓

<html>
<head>
<title>My Page</title> 
</head>
<body>
<table>
<caption>sample</caption>
<tr>
<td>sample1</td>
<td>sample2</td>
<td>sample3</td>
</tr>
</table>
</html>






Table Tag (ATTRIBUTE)


Border Attribute


The border of the Table is specified through this attribute.
The border attribute tells the table how large the borders should be.This is all relative in terms of pixels.

Example ↓↓↓↓↓

<html>
<head>
<title>My Page</title>
</head>
<body>
<table border="5">
<tr>
<td>data</td>
<td>data</td>
<td>data</td>
</tr>
<tr>
<td>new</td>
<td>new</td>
<td>new</td>
</tr>
</body>
</html


Border color

This attribute is used to change the color of the borders.


Example ↓↓↓↓

<html>
<head>
<title>My Page</title>
</head>
<body>
<table border="5" bordercolor="red">
<tr>
<td>data</td>
<td>data</td>
<td>data</td>
</tr>
<tr>
<td>new</td>
<td>new</td>
<td>new</td>
</tr>
</body>
</html>




FRAME Attribute (Border Side)



1.Above = Display top edge
2.below = Display bottom edge
3.border = Display all four sides (Default)
4.box = Display all four sides
5.hsides = Display top and bottom edges
6.lhs = Display left edge 
7.rhs = Display right edge
8.void = Display no border
9.vsides = Display left and right edge

Example ↓↓↓↓

<html>
<head>
<title>My Page</title>
</head>
<body>
<P>
<table border ="5" frame="above">
<tr>
<td>Sample1</td>
<td>Sample2</td>
<td>Sample3</td>
</tr>
</table>
<P>
<table border ="5" frame="below">
<tr>
<td>Sample1</td>
<td>Sample2</td>
<td>Sample3</td>
</tr>
</table>
<P>
<table border ="5" frame="border">
<tr>
<td>Sample1</td>
<td>Sample2</td>
<td>Sample3</td>
</tr>
</table>
</body>
</html>


FRAME Attribute (Border Side)



1.Above = Display top edge
2.below = Display bottom edge
3.border = Display all four sides (Default)
4.box = Display all four sides
5.hsides = Display top and bottom edges
6.lhs = Display left edge 
7.rhs = Display right edge
8.void = Display no border
9.vsides = Display left and right edge


Example ↓↓↓↓

<html>
<head>
<title>My Page</title>
</head>
<body>
<P>
<table border ="5" frame="box">
<tr>
<td>Sample1</td>
<td>Sample2</td>
<td>Sample3</td>
</tr>
</table>
<P>
<table border ="5" frame="hsides">
<tr>
<td>Sample1</td>
<td>Sample2</td>
<td>Sample3</td>
</tr>
</table>
<P>

<table border ="5" frame="lhs">
<tr>
<td>Sample1</td>
<td>Sample2</td>
<td>Sample3</td>
</tr>
</table>
</body>
</html>



FRAME Attribute (Border Side)



1.Above = Display top edge
2.below = Display bottom edge
3.border = Display all four sides (Default)
4.box = Display all four sides
5.hsides = Display top and bottom edges
6.lhs = Display left edge 
7.rhs = Display right edge
8.void = Display no border

9.vsides = Display left and right edge

Example↓↓↓↓

<html>
<head>
<title>My Page</title> 
</head>
<body>
<P>
<table border ="5" frame="rhs">
<tr>
<td>Sample1</td>
<td>Sample2</td>
<td>Sample3</td>
</tr>
</table>
<P>
<table border ="5" frame="void">
<tr>
<td>Sample1</td>
<td>Sample2</td>
<td>Sample3</td>
</tr>
</table>
<P>
<table border ="5" frame="vside">
<tr>
<td>Sample1</td>
<td>Sample2</td>
<td>Sample3</td>
</tr>
</table>
</body>
</html>





Post a Comment

0 Comments