eHow launches Android app: Get the best of eHow on the go.

How To

How to Fix Table Borders in HTML

Contributor
By eHow Contributing Writer
(8 Ratings)

When designing a webpage in Hypertext Markup Language (HTML), you may want to display data in a rectangular arrangement of rows and columns, as in a matrix. You need the "TABLE" tag. To set the rows and columns you use combinations of the "TR" and "TD" tags. For controlling the appearance of the borders you need to use the attributes, BORDER, FRAME and RULES inside the tags, and give them certain values.

From Quick Guide: Working With HTML and CSS
Difficulty: Moderate
Instructions

Things You'll Need:

  • HTML tutorial
  1. Step 1

    Create an HTML page. Create a table with 2 rows and 3 columns in the center of the page. This is the table you will use to see how the various attributes affect the table borders.

  2. Step 2

    Control the size of the outside border. Use "TABLE BORDER=integer." An integer of 0 makes all borders invisible. An integer of 1 or more changes the external border and keeps the internal borders to 1. Putting BORDER without a value defaults it to 1.

  3. Step 3

    Eliminate the external border. Use, "TABLE BORDER=3 FRAME=VOID RULES=ALL." Eliminate the internal borders. Use, "TABLE BORDER=2 FRAME=BOX RULES=NONE" or "TABLE BORDER=2 FRAME=BORDER RULES=NONE."

  4. Step 4

    Show only the top or bottom border. Use, "TABLE BORDER=7 FRAME=ABOVE RULES=NONE" or "TABLE BORDER=7 FRAME=BELOW RULES=NONE," respectively. Show only the left or right border. Use, "TABLE BORDER=3 FRAME=LHS RULES=NONE" or "TABLE BORDER=3 FRAME=RHS RULES=NONE," respectively.

  5. Step 5

    Eliminate the internal or external borders. Use, "TABLE BORDER=3 RULES=NONE FRAME=BOX" or "TABLE BORDER=3 FRAME=VOID RULES=ALL," respectively. Show only the horizontal or vertical sides. Use, "TABLE BORDER=6 FRAME=HSIDES RULES=NONE" or "TABLE BORDER=6 FRAME=VSIDES RULES=NONE," respectively.

  6. Step 6

    Show only the columns or only the rows. Use, "TABLE BORDER=9 RULES=COLS FRAME=BOX" or "TABLE BORDER=9 RULES=ROWS FRAME=BOX," respectively.

  7. Step 7

    Control the color. To add a color, use "TABLE BORDER=8 BORDERCOLOR=RED." To split a border into a light and dark, use "TABLE BORDER=8 BORDERCOLORLIGHT=BLUE BORDERCOLORDARK=GREEN."

  8. Step 8

    Read a more extensive tutorial if you want to make changes not covered here. To read a tutorial that covers all the capabilities of HTML borders, visit HTML Code Tutorial.

Tips & Warnings
  • Remember to put your HTML tags and codes in carrots: "<" and ">".

Post a Comment

Post a Comment
  • Have you done this? Click here to let us know.
I Did This

Related Ads

Internet
Virginia DeBolt,

Meet Virginia DeBolt eHow's Internet Expert.

Get Free Internet Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

Demand Media
eHow_eHow Technology and Electronics