Skip to main content

Attributes of TR Tag in HTML Tables

Use Of TR Tag




<TR> tag is used to create rows in HTML Tables. <TR> is the opening tag to start a row and </TR> is a closing tag to end a row. You can place pairs of <td>...</td> tags to create data cells in a row within the <tr>...</tr> tags.
for example to create a row with only one cell containing data "Apples", we will use the following html code.and Mangoes respectively:
<tr>
<td>Apples</td>
</tr>
Apples
If you want to create a row with two cells containing data "Apples" and "Mangoes" respectively, we will use the following html code.
<tr>
<td>Apples</td>
<td>Mangoes</td>
</tr>
Apples Mangoes
You canm also create a header row with the help of <TR> tag and <TH> tags. For example, to create a header row with two header cells with contents "Employee" and "Salary", we will use the following HTML coding:
<tr>
<th>Employee</th>
<th>Salary</th>
</tr>
Employee Salary

Attributes of TR Tag

1. align


It is used to define the horizontal alignment of text in cells, in a particular row. The possible values are:
left: The text is aligned to the left.
center: The text is centered.
right: The text is aligned to the right.
justify: The text is justified to both, left and right, margins.
Example HTML code
<table border="1">
<tr align="right">
<td width="100">Salary</td>
<td width="100">10000</td>
</tr>
</table>
Salary 10000

2. valign

It defines vertical alignment of the text with in cells in a row. Possible values are:
    top: The text is aligned to the top.
    middle: The text is vertically centered. This is the default value.
    bottom: The text is aligned to the botom.
  

3. bgcolor

It defines the background color that will be used as background of all the cells inside the row.
For example, if we use <tr bgcolor="green">, all cells in this row will have a green background as shown below.
<table border="1">
<tr bgcolor="green">
<td>Apple</td>
<td>Banana</td>
<td>mango</td>
</tr>
</table>
Apple Banana mango

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 Parts of CPU and its Working

CENTRAL PROCESSING UNIT / CPU / Microprocessor / Processor Central processing unit is the brain of computer. It is also called CPU or processor . Processor is used to process data according to given instructions. It performs arithmetic and logical operations on data. Parts / Components of CPU / Processor on computergap.com It controls all activities of different parts of a computer . As brain in human body controls all other parts of body and takes decisions, CPU controls all other parts of the computer and their working. A CPU has three basic parts: Arithmetic Logic unit, Control unit and Registers. Parts of Microprocessor or Processor or CPU or Central Processing Unit computergap.com 1.    ARITHMETIC LOGIC UNIT (ALU) ALU performs data processing according to given instructions. All computations are done in this unit. ALU is the real place in computer where actual execution of instructions takes place. ALU may be further categorized into two sections acco