?
Solved

quick table help

Posted on 2003-03-07
20
Medium Priority
?
228 Views
Last Modified: 2010-08-05
I need someone to point me to some info or show me some info on the laydown of tables. What <tr> is for. What <td> is for. What they would be used for. How to use them. Any information along those lines would be helpful and appreciated. Thanks!
0
Comment
Question by:braindude
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 3
  • +6
20 Comments
 
LVL 33

Accepted Solution

by:
hongjun earned 300 total points
ID: 8093090
0
 

Expert Comment

by:rajivraj164
ID: 8093571
http://www.w3schools.com/html/tryit.asp?filename=tryhtml_tables

As you leanrn, you can use this link to try it out!
0
 
LVL 5

Expert Comment

by:cirtap
ID: 8093610
@hongjun: W3C specs are far from beeing a useful "handout" for a novice :-)

CirTap
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 33

Expert Comment

by:hongjun
ID: 8093619
This is very basic
http://www.annabella.net/tables.html

hongjun
0
 
LVL 8

Expert Comment

by:MusicMan
ID: 8093773
Try this help site - it is very clearly written and easy to use:
http://www.htmlhelp.com/reference/html40/tables/

Hope this helps

MM
0
 
LVL 4

Expert Comment

by:whammy
ID: 8096165
Hmm, I originally learned tables from Annabella's site.

It may not be the most technical introduction to tables/HTML, but she has a knack for explaining things to HTML newbies VERY well - and we were all new once!

Not to mention I thanked her a few months ago for introducing me to HTML and programming, and she sent me a very nice reply. :-)

If you go there, give the points to honguin, since he suggested it first.

http://www.annabella.net/html.html

I would also check out the following sites, once you're done with hers:

http://www.htmlgoodies.com
http://www.webmonkey.com

Once you're through with those you should be able to create almost anything using tables.
0
 
LVL 4

Expert Comment

by:whammy
ID: 8096178
0
 

Expert Comment

by:jwduke3d
ID: 8099033
http://www.htmlgoodies.com/tutors/tbl.html
it has everything you could ever want to know about tables and all the little meanings of <tr> ect...
0
 
LVL 10

Expert Comment

by:substand
ID: 8107141
<table> starts the table.
<tr>, which is nested inside <table>, starts a table row.
<td>, which is nested inside <tr>, is where the content starts.  basically, this is the "table cell."

0
 
LVL 10

Expert Comment

by:substand
ID: 8107158
so

<table>
<tr>
<td>1-1</td><td>1-2</td><td>1-3</td>
<tr>
<tr>
<td>2-1</td><td>2-2</td><td>2-3</td>
<tr>
<tr>
<td>3-1</td><td>3-2</td><td>3-3</td>
<tr>
</table>

creates a 3 row, 3 column table.  I put x-y to symbolize
x=row and y=column.


0
 
LVL 4

Expert Comment

by:whammy
ID: 8107226
If you're going to explain it with an example, you left out colspan and rowspan. ;-)

<html>
   <head>
      <title>Table</title>
   </head>
   <body>
      <table border="1" cellspacing="0" cellpadding="0">
         <tr>
            <td>1</td><td>2</td><td>3</td><td>4</td><td>5</td>
         </tr>
         <tr>
            <td colspan="2">2 columns</td><td colspan="3">3 columns</td>
         </tr>
         <tr>
            <td colspan="4">4 columns</td><td rowspan="2">1 column, 2 ROWS</td>
         </tr>
         <tr>
            <td colspan="4">4 columns</td>
         </tr>
      </table>
   </body>
</html>
0
 
LVL 4

Expert Comment

by:whammy
ID: 8107273
A bit better formatted example... just to give an idea of how to format tables:

<html>
   <head>
      <title>Table</title>
      <style type="text/css">
      <!--
      td {
         text-align:center
      }
      -->
      </style>
   </head>
   <body>
      <table border="1" cellspacing="0" cellpadding="0">
         <tr>
            <td width="50">1</td><td width="50">2</td><td width="50">3</td><td width="50">4</td><td width="50">5</td>
         </tr>
         <tr>
            <td colspan="2" width="100">2 columns</td><td colspan="3" width="150">3 columns</td>
         </tr>
         <tr>
            <td colspan="4" width="200">4 columns</td><td rowspan="2" width="50">1 column, 2 rows</td>
         </tr>
         <tr>
            <td colspan="4" width="200">4 columns</td>
         </tr>
      </table>
   </body>
</html>
0
 
LVL 10

Expert Comment

by:substand
ID: 8107524
I left rowspan and colspan out on purpose, because i didn't want to confuse, since the question asked for "what is it used for"... but i'm glad someone had the courage to post them.

on a side note, i personally wouldn't use rowspan.  its just a lot harder to conceptualize as a beginner, and most browsers now are fast enough where it won't make a difference.  instead, use nested tables for better readability in your code.

the exception is netscape 4.x, where if you nest too many tables, it will crash because netscape is a peice of ****.  i recently got it to crash with 9 nested tables, on a p3 800 Mhz, 128 Mb ram... IE 4+ displayed it in seconds while netscape crashed the computer.

I haven't tested the same code on NS6+, but similar code in that browser seems ok.
0
 
LVL 4

Expert Comment

by:whammy
ID: 8107567
lol @ your comments on ns 4.x.

I figure with a name like "braindude" the posted will take it upon himself to try and understand what we posted, therefore my use of colspan/rowspan, as that definitely explains columns and rows a bit more clearly - to me, anyway.

I don't see anything complicated about it, especially if you look at the simple example (probably better than what htmlgoodies uses, I learned HTML there originally though).

Regarding NS 4.x - 9 nested tables seems a bit much - but of course NS 4.x does "stink".

I would assume at this point that anyone suffering through the plethora of errors (presumably almost everywhere they go on the 'net) using NS 4.x would have the common sense to upgrade their browser. ;)
0
 

Author Comment

by:braindude
ID: 8107692
Whew!! Talk about a response. And about my name... lets just leave it at that ;)  Who ever posted an answer will get 75 points because you all had something good to add in. Thanks for all of the help!
0
 

Author Comment

by:braindude
ID: 8107730
I posted all of the points under Web Languages so you can get them there.
0
 
LVL 6

Expert Comment

by:Programming_Gal
ID: 9647766
0
 
LVL 6

Expert Comment

by:Programming_Gal
ID: 9647802
0
 
LVL 4

Expert Comment

by:whammy
ID: 9647978
?
0
 
LVL 6

Expert Comment

by:Programming_Gal
ID: 9648348
Too late the question has been deleted
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question