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

Electricity Bill Calculator Formulas in Excel

Today, we will discuss How to create an Electricity Bill Calculator Worksheet by using Electricity Bill Calculator Formulas in Excel . The following formulas will be used in Electricity Bill Calculator Worksheet: Q: Prepare a worksheet according to the following instructions: Create a worksheet in MS Excel according to the requirements Enter sample data of Electricity units consumed by customers in a city Apply formula to calculate Units Consumed Apply formula to calculate Electricity Charges Apply formula to calculate Surcharge Apply formula to calculate Bill Payable Note: Every formula will start from  =  Units Consumed Formula=D5-C5 Electricity Charges Formula=IF(E5>200, E5*15,IF(E5>100, 1000+(E5-100)*12, E5*10)) SURCHARGE FORMULA = IF(F5>5000, F5*5%,IF(F5>1000, F5*3%, 0)) BILL PAYABLE FORMULA = SUM(F5:G5) Download Excel Electricity Bill Calculation Worksheet Free  Image for Electricity Bill Calculator Formulas in Excel Softw

Advantages and Disadvantages of Ring Network Topology

Topic: Advantages and Disadvantages of Ring Network Topology alongwith detailed working of Ring topology What Do You Mean by Ring Topology? In Ring topology, each computer is connected to the next computer such that last computer is connected to the first. Every computer is connected to next computer in the ring. Each computer retransmits what it receives from the previous computer. Suppose, computer A needs to send data to computer D. Now the computer A sends data to computer B. As computer B is not the destination computer, so it will retransmit data to computer C. Finally, Computer C will transfer data to computer D, the destination computer. When a node sends a message, the message is processed by each computer in the ring. If a computer is not the destination node, it will pass the message to the next node, until the message arrives at its destination. Advantages of Ring Network Topology 1. It is relatively less expensive than a star topology network. 2. In a Rin

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