Soldier Jane Posted June 19, 2010 Share Posted June 19, 2010 Does anyone else get really annoyed when they see code using tables for layout structure? I don't understand how people learn HTML and grasp this concept. It's 2010 and there are obviously still tutorials out there recommending this practice. What is going on? Quote Link to comment https://forums.phpfreaks.com/topic/205234--/ Share on other sites More sharing options...
Philip Posted June 19, 2010 Share Posted June 19, 2010 Because it works, and that's all they care about. As long as it looks right on the front end, they don't care whats underneath the skin And it is a must for compatibility for email designs, which drives me nuts when I have to do build one... but it's the only option really. Quote Link to comment https://forums.phpfreaks.com/topic/205234--/#findComment-1074293 Share on other sites More sharing options...
JonnoTheDev Posted June 21, 2010 Share Posted June 21, 2010 Does anyone else get really annoyed when they see code using tables for layout structure? If you were creating a report for a web admin, lets say in a CMS system, that shows the top ten users on your website, number of pages viewed, last login time etc, and you want in a spreadsheet style view with headings for totals, etc. Are you going to do this using a table element or div elements with a complex stylesheet for positioning. Consider that the end user may want to add extra heading columns. I agree that a website should not be constructed entirely using table elements for positioning and layout, however they do have their purpose. If I want to present data in a table format that usually comes from a database then the table element is a simple and hassle free option. Quote Link to comment https://forums.phpfreaks.com/topic/205234--/#findComment-1074911 Share on other sites More sharing options...
Daniel0 Posted June 21, 2010 Share Posted June 21, 2010 Does anyone else get really annoyed when they see code using tables for layout structure? If you were creating a report for a web admin, lets say in a CMS system, that shows the top ten users on your website, number of pages viewed, last login time etc, and you want in a spreadsheet style view with headings for totals, etc. Are you going to do this using a table element or div elements with a complex stylesheet for positioning. Consider that the end user may want to add extra heading columns. In that case, the data is tabular by nature, so the use of table tags would be the most appropriate tag to describe the semantics of the data. That would not be the same thing as using it for layout. Quote Link to comment https://forums.phpfreaks.com/topic/205234--/#findComment-1074914 Share on other sites More sharing options...
JonnoTheDev Posted June 21, 2010 Share Posted June 21, 2010 That would not be the same thing as using it for layout. A report has a layout. The use of table elements creates that layout. Quote Link to comment https://forums.phpfreaks.com/topic/205234--/#findComment-1074931 Share on other sites More sharing options...
Daniel0 Posted June 21, 2010 Share Posted June 21, 2010 That's not what I'm saying. I'm saying that your data's tabular nature justifies the use of tables. HTML tags are given default presentational information by your browser, this can be changed using CSS. You can make tables look non-tabular and you can make non-tables look tabular in certain contexts. The fact that people sometimes use tables for aligning their content in specific ways proves this point. Tables provide additional metadata about your data that user agents can use specifically because they describe the semantics of your data. Using this, the user agent can decide how it will use that information, and how it does that depends on the context and its purpose. A "normal" browser, a console based browser, a screen reader and a search engine would all apply this information differently. When you print a page in your browser, it may also decide that it should look differently because the context is entirely different. This is also the reason why tables are inappropriate when your data is non-tabular; you would be claiming that your data is something it is not. So no, it would not be using it for layout. It would be using it for the connotations associated with data being tabular. It's the same thing as adding header tags because you want to define the structure of your text and not because you want the text within the tags to be larger. Quote Link to comment https://forums.phpfreaks.com/topic/205234--/#findComment-1074952 Share on other sites More sharing options...
JonnoTheDev Posted June 21, 2010 Share Posted June 21, 2010 OK, see what you're saying Quote Link to comment https://forums.phpfreaks.com/topic/205234--/#findComment-1075064 Share on other sites More sharing options...
Alex Posted June 22, 2010 Share Posted June 22, 2010 Yeah, it can be annoying when people use tables for their layouts or when they're not displaying tabular data. I usually refer them to http://shouldiusetableforlayout.com (oh I guess they moved it..) http://shouldiusetables.forlayout.com/ Quote Link to comment https://forums.phpfreaks.com/topic/205234--/#findComment-1075542 Share on other sites More sharing options...
Soldier Jane Posted June 22, 2010 Author Share Posted June 22, 2010 Glad to see that I'm not alone I agree tables are appropriate for statistics and more abstract things like a 'control panel'. It's annoying to see it used for layout because technologies like CSS have been developed (and are indeed still being developed) only to have years of work being undermined by trash techniques. Quote Link to comment https://forums.phpfreaks.com/topic/205234--/#findComment-1075734 Share on other sites More sharing options...
Daniel0 Posted June 22, 2010 Share Posted June 22, 2010 Uh, tables were used for layout because of CSS' shortcomings... Quote Link to comment https://forums.phpfreaks.com/topic/205234--/#findComment-1075742 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.