Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1383 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

XHTML code for a table

Thread title: XHTML code for a table
Closed Thread  
Page 1 of 2 1 2 >
    Thread tools Search this thread Display Modes  
06-16-2008, 12:43 PM
#1
alisha is offline alisha
Status: Junior Member
Join date: Jun 2008
Location: India
Expertise:
Software:
 
Posts: 43
iTrader: 0 / 0%
 

alisha is on a distinguished road

  Old  XHTML code for a table

please tell the code for a table in XHTML.

06-16-2008, 01:17 PM
#2
BetaOrange is offline BetaOrange
Status: I love this place
Join date: Nov 2007
Location: Aberdeen, Scotland
Expertise: Design / Coding
Software: Photoshop, iTunes, Firefox
 
Posts: 660
iTrader: 9 / 100%
 

BetaOrange is an unknown quantity at this point

  Old

HTML Code:
<table></table>
This is the main table tags
HTML Code:
<tr></tr>
This is what makes a row
HTML Code:
<td></td>
This is what makes a column

HTML Code:
<table>
<tr>
<td>Hello</td>
</tr>
</table>
That would make a one row and one column table

HTML Code:
<table>
<tr>
<td>Column 1 </td>
<td>Column 2 </td>
</tr>
<table>
That gives us 2 Columns

HTML Code:
<table>
<tr>
<td>Row 1</td>
</tr>
<tr>
<td>Row 2</td>
</tr>
</table>
That gives you two rows

HTML Code:
<table>
<tr>
<td>Row 1, column 1</td>
<td>Row 1, column 2</td>
</tr>
<tr>
<td>Row 2, column 1</td>
<td>Row 2, column 2</td>
</tr>
</table>
That gives you a 2 columned, 2 rowed table.

06-16-2008, 04:29 PM
#3
LeetPCUser is offline LeetPCUser
LeetPCUser's Avatar
Status: Member
Join date: Aug 2006
Location: Wisconsin
Expertise:
Software:
 
Posts: 132
iTrader: 0 / 0%
 

LeetPCUser is on a distinguished road

Send a message via AIM to LeetPCUser Send a message via MSN to LeetPCUser Send a message via Yahoo to LeetPCUser

  Old

I wouldn't recommend tables unless you need to put tabulated data on your website. If you are trying to adhere to new standards and still making a site in a table, I would learn the benefits of CSS and re-code your site.

06-16-2008, 08:27 PM
#4
Ethan is offline Ethan
Ethan's Avatar
Status: I'm new around here
Join date: Sep 2006
Location: US
Expertise: html, css, photoshop
Software: photoshop, notepad, wordpress
 
Posts: 22
iTrader: 0 / 0%
 

Ethan is on a distinguished road

  Old

Originally Posted by LeetPCUser View Post
I wouldn't recommend tables unless you need to put tabulated data on your website. If you are trying to adhere to new standards and still making a site in a table, I would learn the benefits of CSS and re-code your site.
I wouldn't completely count on that. So far I have tested over 15 different layout methods using div/css and every single one has atleast one aweful flaw with cross browser compatibility. I would say that until browsers decide to stop warring against eachother over standards, dont be afraid to use tables to make Stable layouts that display more correctly for all browsers than divs will.

06-17-2008, 02:35 AM
#5
rochow is offline rochow
rochow's Avatar
Status: Member
Join date: Oct 2006
Location: Australia
Expertise:
Software:
 
Posts: 297
iTrader: 4 / 100%
 

rochow is on a distinguished road

Send a message via MSN to rochow Send a message via Skype™ to rochow

  Old

Originally Posted by Ethan View Post
I wouldn't completely count on that. So far I have tested over 15 different layout methods using div/css and every single one has atleast one aweful flaw with cross browser compatibility. I would say that until browsers decide to stop warring against eachother over standards, dont be afraid to use tables to make Stable layouts that display more correctly for all browsers than divs will.
I disagree wholeheartedly.

You have tested different methods. If its not done properly, then of course its not going to work.

Look at it this way. 95% of people use standards compliant browsers (well, standards enough)

For the sake of 5% of people (keeping in mind every other site they visit will look rubbish anyway) are you going to make your site have:
- Slow loading times
- Increased server load
- Decreased flexibility for changes
- Decreased search engine rankings due to excessive markup and not as much content

Of which, having slower loading times and lower search engine rankings will lose customers anyway - so making your site work for 5% extra people, and in turn losing more than 5% of business, is just stupid.

CSS for the win.

06-17-2008, 10:30 PM
#6
Ethan is offline Ethan
Ethan's Avatar
Status: I'm new around here
Join date: Sep 2006
Location: US
Expertise: html, css, photoshop
Software: photoshop, notepad, wordpress
 
Posts: 22
iTrader: 0 / 0%
 

Ethan is on a distinguished road

  Old

Originally Posted by rochow View Post
I disagree wholeheartedly.

You have tested different methods. If its not done properly, then of course its not going to work.

Look at it this way. 95% of people use standards compliant browsers (well, standards enough)

For the sake of 5% of people (keeping in mind every other site they visit will look rubbish anyway) are you going to make your site have:
- Slow loading times
- Increased server load
- Decreased flexibility for changes
- Decreased search engine rankings due to excessive markup and not as much content

Of which, having slower loading times and lower search engine rankings will lose customers anyway - so making your site work for 5% extra people, and in turn losing more than 5% of business, is just stupid.

CSS for the win.
I was on that boat for a while, I went to college for web design and taught CSS to people myself. But it seems that I still come across instances (even simple ones), where even when I consult those who are even better than me with CSS (including this site as well), CSS with divs have failed stability.

Don't get me wrong, I prefer CSS in general over the majority of the point, yet CSS still has flaws concerning cross browser stability in many instances, not because CSS isnt better than tables, but because browsers and standards have not yet come full circle in making CSS/divs work together with them completely.

Also, don't get me as if I'm saying "defintely use tables, they are better", no, rather I'm saying, those little nicks where you can't seem to find any other solution, even from the experts, don't be afraid to use tables every now and then until standards and browsers do start cooperating better.

06-18-2008, 12:05 AM
#7
rochow is offline rochow
rochow's Avatar
Status: Member
Join date: Oct 2006
Location: Australia
Expertise:
Software:
 
Posts: 297
iTrader: 4 / 100%
 

rochow is on a distinguished road

Send a message via MSN to rochow Send a message via Skype™ to rochow

  Old

Originally Posted by Ethan View Post
I was on that boat for a while, I went to college for web design and taught CSS to people myself. But it seems that I still come across instances (even simple ones), where even when I consult those who are even better than me with CSS (including this site as well), CSS with divs have failed stability.

Don't get me wrong, I prefer CSS in general over the majority of the point, yet CSS still has flaws concerning cross browser stability in many instances, not because CSS isnt better than tables, but because browsers and standards have not yet come full circle in making CSS/divs work together with them completely.

Also, don't get me as if I'm saying "defintely use tables, they are better", no, rather I'm saying, those little nicks where you can't seem to find any other solution, even from the experts, don't be afraid to use tables every now and then until standards and browsers do start cooperating better.
Can you name a couple of the situations where CSS has failed?

I'm not anti-tables, as far as more complex forms go I'll use tables rather than CSS (as using <p> for each line is not semantic, as much as so many people round here love to think so) as its quicker, easier, doesn't increase loading time (as its just text and inputs, not images that have to be sliced badly to fit into the tables format)

Not to mention, last time you looked a form, it looked tabular right? So why not just use tables. Its one of the only times I will jump off the "perfectionist" bandwagon and jump onto the "practically first" one.

06-25-2008, 11:10 AM
#8
alisha is offline alisha
Status: Junior Member
Join date: Jun 2008
Location: India
Expertise:
Software:
 
Posts: 43
iTrader: 0 / 0%
 

alisha is on a distinguished road

  Old

please tell me something about CSS.

06-19-2008, 04:26 AM
#9
VimF is offline VimF
VimF's Avatar
Status: Junior Member
Join date: Jan 2008
Location: on CSS
Expertise:
Software:
 
Posts: 63
iTrader: 0 / 0%
 

VimF is on a distinguished road

  Old

Originally Posted by rochow View Post
- Slow loading times
- Increased server load
- Decreased flexibility for changes
- Decreased search engine rankings due to excessive markup and not as much content
I would add that 1,2 and 4 aren't really associated with tables but bad coded tables and inline styling.

06-19-2008, 07:28 AM
#10
rochow is offline rochow
rochow's Avatar
Status: Member
Join date: Oct 2006
Location: Australia
Expertise:
Software:
 
Posts: 297
iTrader: 4 / 100%
 

rochow is on a distinguished road

Send a message via MSN to rochow Send a message via Skype™ to rochow

  Old

Originally Posted by VimF View Post
I would add that 1,2 and 4 aren't really associated with tables but bad coded tables and inline styling.
Everything depends on the design, however:

1) They are for sure - because of the tabular layout, images have to be sliced not so optimally to fit with the content (assuming the site has images, ofc)

2) Tables are still heavier. If you have 2 hits a day, who cares. If you serve a billion pageviews a month, you'll care a ton. That 1kb adds up (and at the end of the day saves $$$ which is the whole goal)

4) This one is 50/50. Some designs have tons of sidebar trash on the left, pushing the content (on the right) way way down in the source. Other designs have content up the top left, so using tables doesn't have an effect. With CSS though (and positioning or margins) content can be put after the header before any sidebars, no matter the layout.

Closed Thread  
Page 1 of 2 1 2 >


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed