TABLE - Frame Attribute 11/8/2023

 The frame Attribute

This attribute specifies which part of the tables borders will be visible. Hence, the frame attribute will always be used with the border attribute. The values that can be specified for frames are as follows:

  • void outside borders are not shown.
  • above top edge of the border is shown.
  • below bottom edge of the border is shown.
  • hsides top and bottom edges of the border are shown.
  • lhs left edge of the border is shown.
  • rhs right edge of the border is shown.
  • vsides left and right edges of the border are shown.
  • box all edges are shown on all four sides (like border).
  • border all edges are shown on all four sides (default).

o illustrate the use of frame attribute.

<html>
 <head><title> Table </title></head>
 <body>
 Ctable border="2" frame="void">
 <tr>
 <td> One </td> <td> Two </td>
 </tr>
 <tr>
 <td> Three </td> <td> Four</td>
 </tr>
 </table><br>
 <table border="2" frame="box">
 <tr>
 <td> One</td> <td> Two</td>
 </tr>
 <tr>
 <td> Three </td> <td> Four </td>
 </tr>
 < /table>
 </body>
 </html>

The rules Attribute
This attribute also works with border attribute of <table> tag. The rules attribute defines, which lines or rules to draw between rows and columns in your table.
The basic difference between the frame attribute and rules attribute is that the frame attribute is used to display a specific outer portion of a table border while the rules attribute is used to display a specific inside portion of a table border. The values that can be specified for rules attribute are as follows:

  • none no rules are drawn or hides all interior borders.
  • groups rules are drawn between row groups and column groups.
  • rows rules are drawn between rows only.
  • cols rules are drawn between columns only.
  • all rules are drawn between all rows and all columns.

To illustrate the use of rules attribute.

<html>
 <head> <title> Table </title></head>
 <body>
 <table border="2" rules = "groups"> <tr>
 <td> One</td> <td> Two </td>
 </tr>
 <tr>
 <td> Three </td> <td> Four </td>
 </tr>
 < /table><br>
 <table border ="2" rules ="rows">
 <tr>
 <td> One</td> <td> Two </td>
 </tr>
 <tr>
 <td> Three </td> <td> Four </td>
 </tr>
 </table>
 </body>
 </html>

Comments

Popular posts from this blog

computer ethics class 8

ORGANISING AND ENCANCING WEBPAGES CLASS VIII

INTERENT BASICS multiple choice questions 16 AUG 2023