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

    Define Data and Information With Examples

    DATA Data is the collection of raw facts and figures. Actually data is unprocessed, that is why data is called collection of raw facts and figures. Define Data and Information with Examples We collect data from different resources. After collection, data is entered into computer for processing. Data may be collection of words, numbers, pictures,  or sounds etc. Examples of Data 1) Student Data on Admission Forms When students get admission in a college. They fill admission form. This form  contains raw facts (data of student) like name, father’s name, address of student, obtained marks, photo graph etc. 2)    Data of Citizens During census, data of all citizens is collected. The staff will go house to house and collect data about citizens like number of persons living in a home, either they are literate or illiterate, number of children, data of each child, cast, religion, Computerized national Identity Card number, address, how many rooms and other facilities in the

    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,

    Explain Main Difference Between System Software and Application Software

    Topic: Explain Main Difference Between System Software and Application Software            Differentiate between system software and application software Before , explaining the main differences between application software and system software, let us know the definitions of Application software and System software with examples. What is System Software: System software is a set of programs to control all components of computer and to manage overall operations of computer system. Differences between System software and application software System software is used as a base to install and run all application software. Examples of system software include: Operating Systems, like Microsoft Windows, DOS, Unix and Linux Device Drivers like Device driver software of a Printer (found on CD normally provided with the printer) Utility Programs like AVAST anti virus, Disk Scanners and File Viewers etc. What is Application Software? Users can use Appli