These articles cover the basics as well as cutting edge developments in HTML.  Home HTML and CSS Articles 7 Reasons Why CSS Is Better Than HTML Tables

7 Reasons Why CSS Is Better Than HTML Tables


7 Reasons Why CSS Is Better Than HTML TablesWebsite designers have been utilizing CSS (Cascading Style Sheets) for many years now. Over and over again, however, I come across an argument that CSS offers no real advantage and whether you code with it or not is just a matter of preference and habit.

I couldn't disagree more.

If you are looking to improve the presentation of your website, CSS will help you do it more efficiently and effectively. CSS based design offers advantages that table-based layout can't compete with.

And here's how:

Faster loading of pages

First of all, you are separating the content of the web page which is text and images into the HTML file and the visual presentation such as the layout, style, color etc. into a CSS file. This minimizes the amount of code in the actual webpage so the loadtime is shorter.

Also, designing a layout using tables requires much more HTML coding then if you were laying things out using CSS. With CSS, the usual table tags such as "td align" or "td width" are replaced with "divs". Code for specifying margin, padding, width, height and other visual details is much more consolidated with CSS. What used to take 200 characters with HTML, may take 50 when coding with CSS. Simply because CSS have cut the use of too much markups, websites can load a lot faster than using tables which is good when attracting visitors to a website.

With these two working hand in hand, the difference is substantial.

Efficiency

Since the content is separated from the layout styles, redesigning is a snap with CSS. All you have to update is the CSS file and the changes will be carried across the entire structure. No more digging through the site, page by page, to update a single tag. Because the layout information is centralized, these changes can be made quickly and globally by default. Markup tags are also much easier to locate since they can be logically organized in your file.

Consistency

As you only update a single file (although you can have many CSS for a single website), the style that you specify applies to any page that you want consistently, without any chance for diversion. This is most evident with positioning. Widths, heights, and margins will be handled the same by any HTML page linking to the same CSS file. You will improve your site's usability, credibility and overall user experience.

SEO advantage

There is a debate whether the use of CSS has any direct impact on SEO. I would say that Google (and any other search engine for that matter) do not have any preference and will certainly not give you any advantage just because your site is CSS based. However, just because there is less code (less messy code) involved, spiders will have easier time crawling your site. And it's known for a fact that they love clean code (just as much as valid one).

Layouts and design sophistication

CSS offers freedom in designing that HTML tables never might. While tables are rigid, inflexible, and grid based, CSS-based designs are fluid, flexible and expandable. That gives designers more power and freedom to exercise their creativity. For example, CSS offers absolute positioning of elements paired with the z-index property. This allows CSS-based designs to position elements on top of one another (like layers in Photoshop), allowing for more unique, complex, and beautiful layouts.

Bandwidth efficiency

A stylesheet is usually stored in the browser cache, and can therefore be used on multiple pages without being reloaded, increasing download speeds and reducing data transfer over a network.

And the 7th reason why you should use CSS? All the cool people gave up tables ages ago . Here, how is that for an incentive?



Author's URL: Joanna Ciolek
These articles cover the basics as well as cutting edge developments in HTML. More Articles: Featured Materials | Fresh Materials | More HTML Tutorials at Markuptutorials.com

Reader's comments
comments wholesale cheap hats December 10, 2011 says:
I never seen this before ,I think is amazing.actually ,[url= cheap hats[/url]this is my frist time here ,if you have time ,you can also visit my site ,thanks.[url= Snapback Hats[/url]
Reply
comments business loans October 07, 2011 says:
Some time before, I did need to buy a good car for my business but I didn't have enough money and couldn't buy something. Thank God my mother adviced to get the loan at banks. Hence, I did that and used to be satisfied with my secured loan.
Reply
comments credit loans September 29, 2011 says:
Some time ago, I needed to buy a house for my organization but I did not earn enough cash and could not purchase anything. Thank God my comrade suggested to get the business loans at trustworthy bank. Thence, I acted that and used to be happy with my collateral loan.
Reply
comments MejiaRoxie32 September 29, 2011 says:
I had a dream to make my commerce, however I didn't earn enough amount of cash to do that. Thank God my close colleague suggested to utilize the <a href=" loans</a>. Therefore I used the term loan and made real my old dream.
Reply
comments petter john November 11, 2010 says:
This is a really informative article,i learn more things from this article...www.psd2htmlslice.com
Reply
comments reddy April 15, 2010 says:
nice article
www.krascent.com

Reply
comments Dietmar November 14, 2009 says:
Allthough it is really important to teach everryone that using css instead of table layouts is essential, I think the discussion has finished long ago and no designer "inside" the industry would really reconsider to design a website using tables. Those times are over long time ago. Anyway nice article but not unique...
Reply
Add comments to "7 Reasons Why CSS Is Better Than HTML Tables"

Captcha