<th> vs <td>

In the html world what is difference between
<th> vs <td>

when we use each under <tr> of <table>
please advise
can i use one another interchangeably?
LVL 7
gudii9Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Leonidas DosasCommented:
The <td> tag, or "table data" tag, creates table cells within a table row in an HTML table. This is the HTML tag that contains any text and images. Basically, this is the element with the most usage .
The <th> is similar of <td> but we using it as a header of a table column
0
Bill PrewCommented:
The Mozilla Developer Network (MDN) is a great resource for information about HTML among other things.  Take a look at the page linked below for a good discussion on tables.



»bp
0
zc2Commented:
Default style of <th> elements is "font-weight: bold; "
You supposed to use <th>  inside <thead>, but actually it could be used instead of any <td>
0
BRMarketingCommented:
The <th> tag defines a header cell in an HTML table.

An HTML table has two kinds of cells:

Header cells - contains header information (created with the <th> element)
Standard cells - contains data (created with the <td> element)
The text in <th> elements are bold and centered by default.

The text in <td> elements are regular and left-aligned by default.

Example:

<table>
 <tr>
   <th>Month</th>
   <th>Savings</th>
 </tr>
 <tr>
   <td>January</td>
   <td>$100</td>
 </tr>
</table>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.