liamloveslearning Posted June 4, 2008 Share Posted June 4, 2008 I recently read a post somewhere online and one "senior poster" mentioned to somebody that he shouldnt use tables, im just wondering does this mean tables are becoming deprecated or is it personal favourites? Also im not sure if this is in the correct board Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/ Share on other sites More sharing options...
ober Posted June 4, 2008 Share Posted June 4, 2008 Tables have been regarded as the bastardized way to do layout for a website for several years. Look up CSS. Tables are meant for tabular data, not defining presentation. Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-557458 Share on other sites More sharing options...
liamloveslearning Posted June 4, 2008 Author Share Posted June 4, 2008 so in the future it would be good practice to give everything a class id and position it using that? ??? i apologize in advance if i sound really amateur Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-557464 Share on other sites More sharing options...
GingerRobot Posted June 4, 2008 Share Posted June 4, 2008 There was a thread about this a while back -- can't remember exactly where. But basically, the short story is: 'you shouldn't use tables' is a rubbish statement. There's very rarely such hard and fast rules. However, its considered bad pratice to use tables to align/position data. That is what CSS is for. It will allow you to modify things far easier, and gives you more control. Tables should hold tabular data. That said, there are certain times (such as creating columns of data from a database) when it is far easier to use a table. Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-557465 Share on other sites More sharing options...
ober Posted June 4, 2008 Share Posted June 4, 2008 That said, there are certain times (such as creating columns of data from a database) when it is far easier to use a table. That is the definition of tabular data... Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-557474 Share on other sites More sharing options...
liamloveslearning Posted June 4, 2008 Author Share Posted June 4, 2008 ahh okay thanks, guess im better of studying all aspects of it then Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-557477 Share on other sites More sharing options...
GingerRobot Posted June 4, 2008 Share Posted June 4, 2008 That said, there are certain times (such as creating columns of data from a database) when it is far easier to use a table. That is the definition of tabular data... Yeah, i guess it is. Its just think there's a slight distinction between a straight forward table of information and, say, presenting your database content in multiple columns since your using tables to achieve a particular presentation. That doesn't sound very clear at all, but i think i know what i mean Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-557479 Share on other sites More sharing options...
The Little Guy Posted June 4, 2008 Share Posted June 4, 2008 there are certain times (such as creating columns of data from a database) when it is far easier to use a table. But not always, sometimes the use of div's AND tables or sometimes just divs are easier/faster. For example, I used div's and a table (holding the links) in this image: Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-557501 Share on other sites More sharing options...
Daniel0 Posted June 4, 2008 Share Posted June 4, 2008 there are certain times (such as creating columns of data from a database) when it is far easier to use a table. But not always, sometimes the use of div's AND tables or sometimes just divs are easier/faster. Easier and/or faster for you is not necessarily the best solution. Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-557636 Share on other sites More sharing options...
The Little Guy Posted June 4, 2008 Share Posted June 4, 2008 there are certain times (such as creating columns of data from a database) when it is far easier to use a table. But not always, sometimes the use of div's AND tables or sometimes just divs are easier/faster. Easier and/or faster for you is not necessarily the best solution. Why not? If it works, then why make it harder on yourself? Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-557689 Share on other sites More sharing options...
Daniel0 Posted June 4, 2008 Share Posted June 4, 2008 Because table-less works better. My signature works for displaying the text "hello world" as well, but it would work better if you just echoed it regularly. Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-557711 Share on other sites More sharing options...
Daniel0 Posted June 4, 2008 Share Posted June 4, 2008 I figured I should explain why I believe what I said above. I think I've said all those things before, but here you go... 1. Separation of concerns A webpage can be split up into three layers: content, presentation and behavior. The technologies used in these layers are HTML, CSS and Javascript, respectively. You can imagine these as a ladder, the higher you go up, the richer the user experience. For instance, while an unformatted HTML document works quite well, it will be much nicer to look at if you style it using some CSS. Moreover, if you use Javascript correctly then you can further increase the user's experience. There are plenty of examples of that. For a simple one, check out my example in the "Is Javascript Crap?" poll in the polls forum. Note that Javascript shouldn't be overused or it will probably just annoy your users. With separation I mean that the those three things shouldn't ever appear together in the same file. All Javascript and CSS should be in external files. This means: no inline styles, no styles in the <head>, no Javascript directly in the HTML document. Humans often don't do things unless they personally benefit from it, so what are the benefits? First and foremost, your code will be much easier to maintain. You are always certain where the different things are stored and everything isn't all mashed up together which makes it much more easier to cope with. Furthermore, seeing as the HTML will be the only often changing data (seeing as it's the content layer), you'll want to keep as less data as possible together with that. The rest can be stored in other files which can be cached so they do not have to be downloaded every time by the user. This means that a) you'll save bandwidth, and b) the page will load faster for the user because s/he has to download less data. In other words, it's a win-win situation. You benefit, the user benefits, so there is absolutely no reason why you wouldn't do it. What does this have to do with the tables? If you are using tables for layout, then you are mixing up the first (content) and second (presentation) layer. 2. Semantics Semantics is the study of meaning. Therefore, it's an important aspect to consider. As an analogy, imagine that you decided that every time you wanted to use the word "table" you would use the word "dog" instead. You would understand it, but everybody else would probably get a bit confused. It's the exact same thing concerning the usage of tables for non-tabular data. If you are using a table then you are explicitly declaring that the contents of the table is, well... tabular, and that's perfectly fine if it actually happens to be so. However, if it's not tabular, then you are using semantically incorrect markup. You might think that it doesn't really matter, because at the end of the day the output on the screen would probably be the same anyways. The problem is though, not everybody browses web pages using their eyes, some people use their ears and are dependent on screen readers, so if you are lying about what the content is, then the screen reader might not be able to interpret the markup correctly and that will probably just frustrate the users that use screen readers. Not only is semantically incorrect markup stupid, but your website is for your users so you must make sure that it's accessible for your users. Therefore, only use tables when you are displaying tabular data. It's also the exact same reason why you wouldn't write an essay in a spreadsheet such as Microsoft Excel. 3. Bandwidth I touched this in point one. Using tables will often generate more HTML markup which means that you will have to transfer more data which leads to slower loading pages. So, separation of concerns, semantics and bandwidth. I'm sure one could find additional reasons why utilizing tables for layout is bad. Remember and use what was just explained and you'll score some easy geek points, but if you use tables for layout, then you'll have a bazillion geek points deducted. Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-557835 Share on other sites More sharing options...
serverman Posted June 4, 2008 Share Posted June 4, 2008 just to put in my note my web desigh class my teacher has us do it all in tables (but at home i am now doing it in divs) heres the wesite he did for the school http://www.choctawindians.net/ i dont really like hime that much he is really crappy with xhtml and doesnt really use css that much Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-557861 Share on other sites More sharing options...
KevinM1 Posted June 5, 2008 Share Posted June 5, 2008 just to put in my note my web desigh class my teacher has us do it all in tables (but at home i am now doing it in divs) heres the wesite he did for the school http://www.choctawindians.net/ i dont really like hime that much he is really crappy with xhtml and doesnt really use css that much Judging by that site, your teacher is a hack. Annoying movie that plays every time the site is loaded, which doesn't allow the user to control it in any way? Annoying mouseover sounds for the main navigation? A website whose actual size changes based on the rotating left column data? A layout that's a mashup of both divs and tables? Hell, he didn't even have the decency to write his own JavaScript (most likely because he can't). Earth to teacher -- 1998 was ten years ago. Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-558205 Share on other sites More sharing options...
Daniel0 Posted June 5, 2008 Share Posted June 5, 2008 just to put in my note my web desigh class my teacher has us do it all in tables (but at home i am now doing it in divs) heres the wesite he did for the school http://www.choctawindians.net/ i dont really like hime that much he is really crappy with xhtml and doesnt really use css that much Tell your "web design" (right... ) teacher from me that he is a noob. Not only does it look hideous, but he just broke every "rule" I just pointed out above. That plus what Nightslyr just said. Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-558209 Share on other sites More sharing options...
serverman Posted June 5, 2008 Share Posted June 5, 2008 yah i would tell him al this but i want to pass the class and i want see him tell next year took his exim tuesday. Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-558289 Share on other sites More sharing options...
trq Posted June 5, 2008 Share Posted June 5, 2008 Passing any web design class run by that guy isn't worth the paper its written on IMO. I wouldn't put it in your CV. Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-558296 Share on other sites More sharing options...
serverman Posted June 5, 2008 Share Posted June 5, 2008 its free. schools pays for the html exam just like the AP tests there free (80$ for school... free for me ) lol Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-558300 Share on other sites More sharing options...
trq Posted June 5, 2008 Share Posted June 5, 2008 its free. And worth every penny, but nothing more. Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-558410 Share on other sites More sharing options...
.josh Posted June 5, 2008 Share Posted June 5, 2008 Passing any web design class run by that guy isn't worth the paper its written on IMO. I wouldn't put it in your CV. Wait..what? I did not sign up for this... /covers cornhole Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-558417 Share on other sites More sharing options...
The Little Guy Posted June 5, 2008 Share Posted June 5, 2008 I love the advanced search feature, it is sooo... advanced we got a "first" and "last" name!!! Tell him to use cookies with his flash so it doesn't play every time you reload the page. Use CSS rollover instead of javascript: http://www.findmotive.com/2006/10/31/simple-css-image-rollover/ Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-558507 Share on other sites More sharing options...
KevinM1 Posted June 5, 2008 Share Posted June 5, 2008 I love the advanced search feature, it is sooo... advanced we got a "first" and "last" name!!! Tell him to use cookies with his flash so it doesn't play every time you reload the page. Use CSS rollover instead of javascript: http://www.findmotive.com/2006/10/31/simple-css-image-rollover/ That can't be bolded enough. I hate JavaScript rollovers. Most of the ones I've encountered either have horrible animation, horrible sound (like these), or are so simple that the use of JavaScript is unnecessary. The thing I find so deliciously ironic about that site is that it violates a lot of very simple design concepts, yet this guy is being paid to teach students about design. Where can I get a job where I can fail so horribly at what I do, yet still get paid? Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-558610 Share on other sites More sharing options...
liamloveslearning Posted June 5, 2008 Author Share Posted June 5, 2008 at the end of the day its an awful website; but did anyone actually use there schools website? Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-558613 Share on other sites More sharing options...
KevinM1 Posted June 5, 2008 Share Posted June 5, 2008 at the end of the day its an awful website; but did anyone actually use there schools website? Well, my high school didn't have a website until after I graduated. I'm an old fogey. Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-558619 Share on other sites More sharing options...
serverman Posted June 5, 2008 Share Posted June 5, 2008 all the clubs and crap post info on there and it gets like 500 hits a day ((not counting within the school)most are the same person) also we have the google hit tracker thing for it and we have like 20 hits from russia and 3 from iraq Quote Link to comment https://forums.phpfreaks.com/topic/108708-web-standards/#findComment-558785 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.