Skip to main content

Attributes of Table Tag



Table Tag Attributes

  1. Border: It is used to specify a border and its thickness for a table.
  2. Cellspacing: It is used to specify the distance between adjacent cells in a table.
  3. Cellpadding: it is used to specify the distance between a cell and cell contents in a table.
  4. Width: It is used to specify width of a table in pixels or as percentage to screen width.
  5. Align: It is used to specify the horizontal alignment of a table. Possible horizontal alignment values are "left", "right" or "center".
  6. Valign: It is used to set the vertical alignment of a table as "top", "bottom" or "middle".
  7. Bgcolor: It sets the background color of a table. You can specify color names or hex values for the color.

    Example of table with border=1, width=200 and align=center attributes

    HTML Coding:

    <table border="1" width="200" align="center">
    <tr>
    <th>Book</th><th>Price($)</th>
    </tr>
    <tr>
    <td>Visual Basic</td><td>75</td>
    </tr>
    <tr>
    <td>C++</td><td>45</td>
    </tr>
    </table>

    BookPrice($)
    Visual Basic75
    C++45

    Example of table with border=5, cellpadding="10" and cellspacing="10"

    <table border="5"  cellpadding="10" cellspacing="10">
    <tr>
    <th>Book</th><th>Price($)</th>
    </tr>
    <tr>
    <td>Visual Basic</td><td>75</td>
    </tr>
    <tr>
    <td>C++</td><td>45</td>
    </tr>
    </table>
    BookPrice($)
    Visual Basic75
    C++45

     Example table with border="5" width="300" bgcolor="yellow"

    <table border="5" width="300" bgcolor="yellow">
    <tr>
    <th>Book</th><th>Price($)</th>
    </tr>
    <tr>
    <td>Visual Basic</td><td>75</td>
    </tr>
    <tr>
    <td>C++</td><td>45</td>
    </tr>
    </table>

    BookPrice($)
    Visual Basic75
    C++45

    Comments

    Popular posts from this blog

    What are uses of computer at Home

    Uses of Computer Today, computer is used in almost every field of life. The use of computer has made different tasks very easy for us. Computer can be used at home in the many different ways. Explain different uses of computers at Home Computer has made a very vital impact on our society. People are using computers for performing different tasks quickly and easily. In fact, computer has made our life more comfortable.   Uses of Computer at Home Computer can be used at home in the following ways: 1.  Home Budget Computer can be used to manage the home budget. What are the Uses of computer at home You can easily calculate your expenses and income with the help of a software like Microsoft Excel. In MS Excel you can prepare a simple worksheet to calculate your daily expenses and income. 2. Computer Games An important use of computer at home is playing games. Different types of games are available. And if you have internet connection, then you can play games online

    Explain different types of storage devices

    Topic: Explain different types of storage devices in Computer systems Storage Devices Storage devices are used to store data and instructions permanently. Storage devices are also called secondary storage devices / backing storage devices / external storage devices or auxiliary storage devices. Examples of storage devices include Hard Disk, CD and DVD etc. Why Secondary Storage Devices are Used? Secondary storage devices are used because: Primary memory(RAM) is volatile and temporary. When computer is switched off, all data in ram is erased. Storage devices can store large amounts of data and instructions permanently whereas Primary memory has less capacity of storing data. Types Of Storage Devices There are three main types of storage devices:  Magnetic Tape   Magnetic Disk   Optical Disk   Flash Memory storage devices 1. Magnetic Tape Magnetic tape is the oldest storage device. It is made of plastic coated with magnetic material. Data is stored on mag

    Important Objective Type Questions 101-155

    MMC stands for multimedia card. SD stands for secure digital card. System Bus  is used to connect main components of a computer such as cpu and main memory. A Port is an interface or a point of attachments. POS stands for Point Of Sale terminal. ATM stands for Automated Teller Machine. PIN stands for Personal identification number. Kbps stands for kilobits per second. Mbps stands for megabits per second. A port that transmits one bit at a time is called Serial Port. A type of port that transmits many bits at a time is called Parallel Port. LPT stands for Line Printer. Examples of system software are Operating System, Utility Programs and Device Drivers. Examples of operating systems are DOS, Windows, Unix and Linux. Examples of Utility programs are File Manager, Image Viewer, Disk Scanner and File Compressor. Software used to detect and remove viruses is called Antivirus . Examples of antivirus programs are Mcaffee, Avast,