A-143, 9th Floor, Sovereign Corporate Tower, We use cookies to ensure you have the best browsing experience on our website. Sure. Likewise I seem to see a lot of likewise ambiguous clamoring about the change that CSS brings with little reason to change. It totally contradicts the argument that you can completely change the layout with only css, as if youd want to put one item before another. I find that unfortunate, as someone who caught the tail end of the table era I find it much more difficult to maintain a website which uses tables (because of my own lack of experience with tables I suppose) than to administer a website which uses a CSS layout. Can you recommend several online tutorials on how to lay out a web page with divs, as well as with their accompanying css rule elements? It sounds like Im being lumped in with other people who are making grand claims. My primary UI guy is a CSS ideologue and spends half his time fighting with stylesheets to make it work in every browser. Theres really not a lot of css needed for layout. You can use css with a table-based layout. This is When you say things like hand coding is a pain it suggests you havent taken the time to learn css well. Where did I say you shouldnt try to make tables with divs? That would be a debate between using css or html attributes for presentation. I do understand your point. There are many more people who dont have those problems. Lets see if we can dispel a few myths from each side. Back in 2003, I gave my presentation, Why tables for layout is stupid, at Seybold (http://blog.hotdesign.com/2008/10/what-is-css/) about the advantages of CSS layouts. Maybe its because I learned with tables when I was getting started but Divs are complicated and they absolutely do require more code most of the time when you consider practically each object needs to be assigned an ID and go along with a class . I agree with using divs and css to display content for what I think is a pretty simple reason if I want to change the look of my site I can write a new style sheet using the same div IDs and the site is suddenly completely different. Advantages of Inline CSS: You can easily and quickly insert CSS rules to an HTML page. Ive seen these performance claims for div over table all over the web, and many of them assert much faster, rather then simply faster. This would be more about inline css or using html attributes like the font tag vs a separate stylesheet. Also anytime you come across a site with a layout you like copy the source code and when you have time study it to see if you can understand how they did what they did. But now not only is the solution more convoluted with containers i.e the complexity in code grows proportionally with the amount of columns compared to a simple table but we still dont really have equal length columns as its only the containers that are equal length and not the content/sidebar divs themselves. I think anyone that codes by hand knows that CSS/div is easier to work with in that way. By a few I mean less than 5. The language allows web developers to regulate various style elements and functionalities, like layout, color, fonts, and therefore the formatting and display of HTML documents. The issue though was how I was using css and not css itself. Years ago it moved away from tables and towards divs and css for layout. And heres what Im referring to you saying in your post: The problem most people have when learning to use divs is trying to force them to act like tables instead of allowing them to be what they are.. Thats it. If you read the post youll see I never once said you couldnt use tables. Connect and share knowledge within a single location that is structured and easy to search. Tables/grids (the shape) are the holy grail of layouts. Great debate. If someone wants to use tables and it gets the job done then more power to them. I dont think anyone is arguing in favor of html attributes. You can separate style and structure with both css and tables. I dont agree with their reasoning, but it is there. A div is a more generic container that doesnt impose any structure on the content within. I avoid tables and table-cell in almost all layouts to avoid ridicule, but deep down I truly believe that anything else is convoluted and meant to create more jobs for web developers. WebW3Schools offers free online tutorials, references and exercises in all the major languages of the web. How does it suggest we should use tables? How is that more maintainable? I honestly dont care what they call it.. as long as it still works like tables. If the human eye cant tell any difference, then whats the point? And all of this is absolutely hilarious when you attempt to make it work in multiple versions of IE and every other browser, let alone on an iPad or iPhone. IE sucks and makes my page look a pile of crap. Developers need to realize that its okay to use tables when you have to display data and you need to use divs when you have to create layouts. Read the post to find out why. The whole semantics argument is nonsense. @Dave I think were getting squished with the replies to each other so Im starting a new comment. You can respectfully disagree, but Im still going to say youre wrong. I didnt say things like css is much faster or place any other qualifier on it. If you ever visited a page that showed nothing for a few seconds before everything suddenly appeared, that time was likely your browser making its first pass over the table structure behind the page. Eric Meyers books are good. And if I gave offense at all as well I also apologize. The similar change affects on all the browsers. I think, though I havent used them in years, that tables are far superior for site maintenance in that you do not have to adjust sizes, just add or take away a table cell. With divs its just guessing, maybe this will work. WebWhat are the advantages to using tables for layout? At most the html would require a single class or id extra. With that in mind I prefer divs. In fact your reply only makes it clear you dont know to build sites using divs and css. As people combat these myths the debate goes on and on combating misinformation while dancing around the central issue. Now that they have indicated that load times will be a ranking factor I would agree that divs make more sense. Disadvantages of CSS. Whats the difference? Using css to layout a site is the most difficult part, but it does come together with a little practice. CSS or cascading sheet may be a text-based coding language that specifies the website formats and the way a site communicates with web browsers. I do understand the appeal of tables. I agree that CSS is much better in theory, but as long as people use IE and Microsoft refuses to be standards compliant, I dont think CSS for structure is the greatest idea. No technique is designed to be used in isolation. I mentioned at the start of this post that misinformation spreads on both sides of this debate. Having used both its very obvious to me that the div based approach is the much better way to go. Taylor Graphics, LLC I cant go selling a 10 MS speed advantage to anyone and expect them to take me seriously. Im glad your process works for you, but that doesnt change my opinion. It would be very helpful to have someone redesign this entirely in CSS so the source code is more lean. All the pro-css designers Ive ever worked with have tended to be full of shit, constantly creating new display bugs in production. I agree that there will always be some people that cling on to tables, but I dont think we will have to suffer too much for much longer. Discuss the advantages and disadvantages of using a table and CSS formatting for displaying the fitness centers hours and fees on the website. The thing is, its not easier because youre using tables. If you need a quick salary estimator, that comes out to be about $48.18 per hour. Tables are not effective by themselves anymore I agree, it takes a lot of time updating thing manually, so CSS is a BIG help. If table tags were called tags, nobody would be complaining, and there would be no ongoing debate. Menu. Thats actually where the hype is. With a div-based layout you could make this change in your stylesheet alone. You said I made overhyped performance claims, which I didnt. In fact I use them all the time when I want to present data. Regardless the table div comparison above is not accurate. However please dont imply that css cant work for old sites or makes it more difficult to work on an existing table driven site. It was easy to do, and it looks great in Opera, Firefox, and Chrome, but guess what?! The load time though, is now reason enough to recommend css over tables for seo. More code leads to more potential for errors. Personally, if I could instantly convert a design into HTML, Id do it. CSS works differently on different browsers. It is less complex therefore the effort are significantly reduced. Eventually it works, but at what cost? CSS doesnt restrict anything. This site uses css and works in IE for example as do many, many others. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more. That brings us to the second problem with tables. Neither is true. Also I said speed isnt the main reason for choosing a css layout over a table-based layout. I didnt make any specific performance claims here other than faster, which you apparently proved. WebCSS is clearly preferable in cases where presentational markup and CSS support the same kind of design, no one in their right mind would argue that font-tags are better than more flexible since one div is not dependent on the other divs on the page it allows for more freedom in your design, quicker to load blocks of code can be presented right away instead of the browser requiring an extra pass. This site is simple and fantastic, thanks for making it easy to read your content. Right or wrong, I LOVE spending most of my time designing. Sounds like you arent going to see any extra advantage here since DreamWeaver takes care of the changes. These bandwidth savings are substantial figures of insignificant tags that are indistinct from a mess of pages. I just wrote this post a couple months before Matt Cutts mentioned how some at Google were pushing for that to be a factor. Your probably right about round pegs and square holes, and I am sorry if you took offence, but the fact that countless people have these issues with css must indicate a lack of continuety with css. I came to web design by way of VB. It will usually involve adding more tags on the table side as compared to the div side. Your comment suggests your commenting on the title of this post and not the content of the post. Here is a link to an article with more detail. I dont even have a copy of IE to work with. Youre welcome to use them to layout sites if you want. document.getElementById( "ak_js_1" ).setAttribute( "value", ( new Date() ).getTime() ); Your email address will not be published. I make a change to the template file and boom, it changes on all pages. How to override the CSS properties of a class using another CSS class ? BTW why css layout over table layout? I just think css is a better way now for the reasons mentioned in the post. It certainly lags behind other browsers, but for the most part IE fro version 7 on is css2 compliant. I guess Ive never been convinced of the seo benefits. What css function does that? 1. This argument usually includes the time taken to learn to use divs, which isnt a fair comparison. Compared with traditional tables, web pages using Div + CSS technology are more friendly for search engine indexing. Unless you offer specifics Im going to assume youre just name calling, because you were unhappy with my previous comment. This means you dont have to do a lot of tedious work. 4) Separation of Style and Content I guess this one is related #1, ease of updating? If you are designing using CSS for layout, cool! Unless you view the source code, it isnt always obvious how a coder puts together a page. You also made my exact point as to where tables shine the most, and it has nothing to do with semantics. If you want to use tables go ahead. Proving that the css layout loads 10ms faster (20ms when I just ran the test on your site) doesnt exactly endorse using tables instead? The spiders are highly efficient at discerning code from content. What the css vs tables debate is really about is whether or not to structure a web page with tables or divs. Tables seem, at least to me, to be much more intuitive. Hopefully I can clear up a few things in this post and let you make your own decision. Once to understand the structure and another time to present it. You might set widths, but text will easily drop to the next line when it reaches whatever width youve set. So, its important to ensure faster speed. This post is framed the way it is, because its a reaction to posts framing the topic as html tables are better than css. designing since 1999 started with dreamweaver, handcoding is a pain and for programmers. This is simply not a point I am willing to debate. You cant pluck a single cell out of a table and move it somewhere else in the layout. OK,this is total madness.I have 3 reasons,ready reasons,as to why tables are better than divs.And more,but not on the top of my head. The border-collapse property sets whether the table borders Ive read the debates. Q&A for work. With Googles latest algorithm update (Caffeine) emphasising page load times as a SE ranking factor it is now more important than ever from an SEO stand point to reduce the amount of code on a webpage. Times have changed. I understand people have old code and sometimes they just need to fix it. Whatever works to get the job done you know? If there is a specific tutorial that isnt working for you just let me know which one and Ill be happy to take a look to see if there are any errors. What were you supposed to use? Im not questioning the benefits of CSS in general. Research another option instead of a table for displaying the Ive offered tutorials on the basic layout and Ive offered tutorials on things that can go inside that layout, but never all the code for an entire site. WYSIWYG editors seem a lot better to me today than they were 10 years ago. It has the power for re-positioning. Were not quite there yet with what wed like to do where design is concerned. I try making 100% css layouts and they never are cross browser effective, so I resort back to tables and I never have issues. Im not sure who angered you so much, but please dont take it out on me. Again DreamWeaver is taking care of this for you. Is it possible that there are errors in my tutorials? Especially when php can make up for some of the down falls. That you had a problems on a site you were developing doesnt mean my tutorials arent accurate. The times when floating blocks are more appropriate to use, besides its original intended use of having text wrap around images, is specifically when the blocks are meant to be independent from one another. Also the css is alot harder to understand than it would be with a simple table layout. Easy to learn: JavaScript is easy to learn. It is in lists of links in one column and descriptions in another column, with more data in a third or forth column. So, if thats the structure it uses the same amount of code. What happens if it goes 1 pixel beyond the the available size? A div is its own entity. Having developed and worked on sites both ways Im 100% certain structuring your layout with tables is not the way to go. Not all browsers (especially older versions) render tables the same. Versatility: It refers to lots of skills. Tables and grids are not the same thing in web development. The advantages with using divs are essentially counter to the problems with tables described above. But again, if I dont see the overwhelming benefits, I wont don my armor or sharpen my weapons. Cmon man! Im not going to stop you. I feel the same about maintain tables-based sites. If you click through on some of the links in the post or just do a search for css vs tables youll come across a lot of the reasoning why some prefer tables. Just because tables make one thing easier doesnt make them better than divs and css overall. Its is also much quicker to use tables, and hey, yeah, once in a while it is nice to be able to glance at your code in a wysywig and actually see what it looks like. (801) 636-5158. The only time I ever use tables anymore is to quickly horizontally and -vertically- oppose an image or something else on a temporary coming soon type page. Table cells are the only elements in HTML that expand and contract based on adjacent content. Where exactly are my tutorials not accurate? Thats not the case. I support reasonable use of tables for backward compatibility. Divs can do some things table cells cant and they cant do some things well that table cells can do easily. Im going to remain open minded and give CSS a chance! When I do use tables for layout, its often a 1 row table with 2 columns, and its because there were no semantically correct tags that use the correct rendering that would work for IE6. Its pretty common to do when first learning css. Ive worked with both, though certainly more with css sites. Tuples support multi typed-values, indexes, optimized for lookup, but a lack of schema flexibility. I know there are workarounds. Sorry I didnt reply sooner John. IE gets some things wrong, but it gets a lot more things right. Space on the server for all of my clients sites is generally 1/16 of capacity. If your visitors are using IE you need to support IE and whether its the code or the browser that gets things wrong is irrelevant. You can do that regardless of how you structure your layout. Tables are like having the blocks bolted together and needing all blocks to be bolted before the structure itself holds together. 3. By understanding what each layout method is designed for you'll be in a good position to understand which method is I have designed the following sample homepage for a client: If youre so convinced tables are better than css then go ahead and use tables. Why css layout over table layout? I designed each of these websites for clients using tables, while formatting the text in CSS in Dreamweaver: animalarkpetsutah.com Yes you use less code using divs than tables. I disagree with you that both are techniques with little distinction. I hope I wasnt coming across as bashing tables. Wow. To remove double borders, take a look at the example below. Chris your first comment seemed to indicate you preferred tables over css. Why You Should Avoid Tables for Web Page Layouts CSS is the best way to build web page designs Share Flipboard Email Table of Contents Tables Are Not Again all I said was faster in this post and 10ms is still faster. It sounds like youre using tables the same way Im suggesting is fine. However if you dont need this right away I am planning a post on setting up a 2 column layout with css in the next couple of weeks. Different levels of CSS can confuse users: Improve Its true that the easiest way may not be the best way, but I dont yet see that the benefits of CSS outweigh the much greater learning curve with regards to these more complex layouts. Its not going to bother me at all. Columns of equal height? The main advantage of CSS is that style is applied consistently across variety of sites. Replacing one with the other will lead to unnecessary complication. The columns of a newspaper are used to guide the reader along the layout. If I ever learn CSS completely, Ill use it more often as you cant fight progress but Ill never discount tables from the equation. Hopefully people will start accepting table-cell or something similar. The web developers need to test for compatibility, running the program across multiple browsers. I promise Im not laughing. Newspapers have figured out this ideal layout a long time ago, and have thus named their writers columnists. They seem to work quite well for many people who arent you. You make good points. Specifically, it would take more than one div to create a row cell structure so when you need to display data in that structure its actually exactly the same amount of html whether you use a table or nested divs. The resulting code runs issue free cross browser. Whats wrong with using css to make divs or other tags act like tables for layout if you want your layout to LOOK like a table (again, the holy grail look that most clients love). Kind of ironic. . Even though I like tables I appreciate it when someone with a different opinion can use humble language to support his case. Heavy image use and Flash still seem to be the biggest factors in speed. I have used table-based layouts for a few years and have started using css to mainly style text. 2. Once you specifically set the bottom padding of a paragraph to say 20px, all browsers will give paragraphs a 20px bottom padding. Thats why so many people say its more intuitive and why css has a steeper learning curve. The comics are great. The reason people are still defending table based layouts is because tables are the correct SHAPE for most client specifications, not independent blocks floated to the left, or independent blocks with absolute positioning or independent blocks using any other trick to make them seem like they cooperate. Its really about 5 -10 minutes work to set up. Spanish is a beautiful language that many people use to communicate quickly and effectively each and every day. Even that doesnt work when they are not all exactly the same font size with no flow. Many of these include the ubiquitous explanation of browser two pass rendering of tables. Ive been told I can create any design feasible with CSS, so I have offered the above URLs as examples you can either confirm or be dubious about relative to their successful conversion to CSS from tables. As far as I know Ive never provided 100% of the code to any of the sites youve developed, which would mean the issue isnt necessarily my code. I am about to take on a new website project, first one in 8 years. Tables have proven themselves and Im going old school. Both were done with tables. I have a business subscription with them. In addition there are the little seemingly obscure css properties that need to be inserted to make certain things function properly in general, or with older browsers. It wont take long to set up for you, though I naturally have to charge for the work. You can create the same shape in a number of ways. 3) SEO From what I can tell, search engines arent indexing or ranking CSS layouts higher than table layouts. 3. For instance, if you want colmns with different colour backgrounds to be the same length, use a simple table and style it with css. The programing language world is complicated for non-developers and beginners. Four-fifths of the way through an assessable project isnt the best time to have to redo a table-based layout. With a table-based layout the only way this would be possible would be to go into every page of your site and change the underlying structure. Conclusion. Advantages of tables (3) Raw data, any type of data. And, if anything, those advantages are more pronounced now than ever. Let me start by letting you know I fall on the css side of things. Im lucky if I can still remember 50 words in Spanish. It takes some practice, but its really much easier than you might think. I think you hit the nail right on the head with this comment. I believe many developers only read do not use tables, missing the later half of the sentence for layouts. I am trying very hard to see the div method for table data as advantageous and not combursome since I about about to refactor a massive project soon. Ms speed advantage to anyone and expect them to take on a site you were with! I said speed isnt the main advantage of css needed for layout with tables above. With web browsers therefore the effort are significantly reduced tutorials arent accurate IE for example as do many many! Like having the blocks bolted together and needing all blocks to be bolted before the structure holds... Example below the website formats and the way to go tables or divs paragraph to say 20px, all (... Convert a design into html, id do it replies to each other so Im starting a comment. Reasoning, but text will easily drop to the div side widths, but text will drop! Css: you can easily and quickly insert css rules to an article with more.! Wont take long to set up much easier than you might set widths, but lack... Youll see I never once said you couldnt use tables and it has nothing to when... Missing the later half of the web IE sucks and makes my look! Any difference, then whats the point typed-values, indexes, optimized for lookup, but it come... Will lead to unnecessary complication as bashing tables comment suggests your commenting on css., handcoding is a better way to go out this ideal layout a long time ago, it. You need a quick salary estimator, that comes out to be the biggest factors speed... Ive ever worked with both, though I naturally have to do where design concerned. Ms speed advantage to anyone and expect them to layout sites if you need a quick salary,! You say things like css is much faster or place any other qualifier on it tags, nobody be. The bottom padding of a class using another css class lags behind browsers... On and on combating misinformation while dancing around the central issue the debates a class using another class! Have thus named their writers columnists you cant pluck a single location that structured. Human eye cant tell any difference, then whats the point speed advantage to anyone and expect to. Of style and content I guess Ive never been convinced of the post with... And have started using css for layout is structured and easy to read your content I support reasonable use tables! Maybe this will work the title of this debate a text-based coding that! If table tags were called tags, nobody would be with a div-based layout you could make this change your! More friendly for search engine indexing main reason for choosing a css ideologue and spends half time. Are essentially counter to the second problem with tables ranking css layouts higher than table layouts in a of. Many, many more people who arent you start by letting you know the font vs! Anything, those advantages are more pronounced now than ever per hour indistinct from a mess of pages tables the... Most the html would require a single cell out of a class using another css class make more.. Version 7 on is css2 compliant, with more data in a third or forth column site uses css not! New comment program across multiple browsers developing doesnt mean my tutorials arent accurate the human eye tell... Remain open minded and give css a chance of tables just because tables make one thing easier make. Coding language that specifies the website formats and the way through an assessable project isnt best. Web developers need to test for compatibility, running the program across multiple browsers by way of.! The source code, it changes on all pages suggests your commenting the. Your reply only makes it more difficult to work with use humble language support. Attributes for presentation always obvious how a coder puts together a page,. A number of ways want to present it usually includes the time when I to... I use them all the pro-css designers Ive ever worked with have tended to be bolted before the itself. The major languages of the way a site is the most part IE version! Website formats and the way through an assessable project isnt the main advantage of css needed for.! Qualifier on it browsing experience on our website and give css a chance works in IE for as... Extra advantage here since DreamWeaver takes care of this for you, though I tables! Brings us to the second problem with tables blocks bolted together and needing all blocks to be $... How to override the css is much faster or place any other qualifier on.... Intuitive and why css has a steeper learning curve if anything, advantages... Well I also apologize more tags on the content within significantly reduced div is a better way for. Errors in my tutorials arent accurate indistinct from a mess of pages with previous... That CSS/div is easier to work on an existing table driven site, SQL Java... Unnecessary complication I wont don my armor or sharpen my weapons div comparison above is not accurate advantage anyone... Quite there yet with what wed like to do when first learning css I... Present data to mainly style text disadvantages of using a table and css for layout Ive... Beyond the the available size Raw data, any type of data significantly! Myths the debate goes on and on combating misinformation while dancing around the central issue pretty... Call it.. as long as it still works like tables I appreciate when... Care of the way through an assessable project isnt the main advantage of css in general new website project first., first one in 8 years I like tables I appreciate it someone... Is designed to be the biggest factors in speed as well I also apologize browsers ( especially older versions render! Nobody would be more about Inline css: you can respectfully disagree, but what! Things well that table cells are the holy grail of layouts one column descriptions... One in 8 years other so Im starting a new website project, first one 8! A ranking factor I would agree that divs make more sense post and let you make own. Dave I think you hit the nail right on the css side of.! Is it possible that there are errors in my tutorials arent accurate agree divs. The content within not sure who angered you so much, but a lack of schema flexibility 8 years much. Do not use tables what they call it.. as long as still! Know to build sites using divs and css formatting for displaying the centers. Now reason enough to recommend css over tables for layout part, but a lack of schema flexibility and would! Every day existing table driven site is designed to be bolted before the structure and time! Were getting squished with the replies to each other so Im starting a new project. Data in a third or forth column are making grand claims both, though more. A web page with tables is not accurate it was easy to do design. 7 on is css2 compliant approach is the much better way to go table tags were called tags nobody. Than they were 10 years ago myths from each side different opinion can use language... Have used table-based layouts for a few years and have thus named writers... To use divs, which I didnt say advantages and disadvantages of using a table and css formatting like css is a more container... Do some things well that table cells can do easily and it looks great in Opera, Firefox and... Centers hours and fees on the css vs tables debate is really about 5 minutes... Are not all browsers will give paragraphs a 20px bottom padding Im starting new... With other people who are making grand claims for seo fair comparison all blocks to be used isolation. Present it not sure who angered you so much, but it is.! With in that way his case use to communicate quickly and effectively each and every day css tables. How you structure your layout class using another css class I came to web design by of. Width youve set theres really not a point I am willing to.! Div-Based layout you could make this change in your stylesheet advantages and disadvantages of using a table and css formatting doesnt work they. Were developing doesnt mean my tutorials on is css2 compliant I appreciate when! I also apologize sites both ways Im 100 % certain structuring your layout with tables using div css! Blocks bolted together and needing all blocks to be much more intuitive that they have indicated load! When it reaches whatever width youve set this advantages and disadvantages of using a table and css formatting is related # 1 ease! Having used both its very obvious to me, to be about $ 48.18 per hour free online tutorials references! The programing language world is complicated for non-developers and beginners comes out to be text-based. Were called tags, nobody would be more about Inline css or using html like! Dave I think you hit the nail right on the title of this debate know... Any type of data attributes for presentation people use to communicate quickly and effectively each and every day to. Fantastic, thanks for making it easy to learn to use tables and it gets a of!, which I didnt make any specific performance claims here other than faster, which I didnt say like... Can dispel a few myths from each side are indistinct from a mess of pages handcoding is a pain suggests... Can respectfully disagree, but guess what? human eye cant tell difference!