HTML <Table> Frame Attribute

Frame attribute in HTML tells the browser to show which side of the border. The frame attribute gives the control to modify the border style in many different way which is not possible in border attribute.

Following values can be set for frame:

Borders : Show borders on all sides of the table and between the cells

Box : Show borders on all sides of the table and between the cells

Void : Show no borders

Above : Show border on top side of the table

Below : Show border on bottom of the table

hsides : Show horizontal border on top, bottom and between the rows

vsides : Show vertical borders on right and left sides

lhs : Border on left hand side only

rhs : Border on right hand side only

Here is the HTML code for the frame attribute:

<Html>

<head>

<title>

</title>

</head>

<body>

Frame attribute with box value

<table frame="box">

<tr>

<td>

Country 

</td>

<td>

Currency

</td>

</tr>

<tr>

<td>

US

</td>

<td>

US Dollars

</td>

</tr>

<tr>

<td>

Canada 

</td>

<td>

Canadian Dollar

</td>

</tr>

</table>

</body>

</html>

image 

<table frame="above">

image

<table frame="below">

image

<table frame="hsides">

image

<table frame="vsides">

image 

<table frame="rhs">

image 

As you can see from the above examples you can change the style of border by changing the frame attribute value.

Tags: , , ,

Author: Revo

Share This Post On

Submit a Comment

Your email address will not be published. Required fields are marked *

five × five =

 

Pin It on Pinterest

Shares
Share This