What is CSS?
CSS is a simple file which controls the visual appearance of a Web page without compromising its structure. Using CSS we can control our font size, font color, link color and many other attributes on our web page. This will make our HTML code much more readable and the page size will be reduced.
Why to use it and how to use it properly
If you don't use CSS on your web pages and you have many tables and content on them, chances are that your HTML file size will be quite big. Fact is that we live in a busy world, and people are not will to wait more than 5 seconds web page to load.
From the other side some web developers implement the CSS on wrong way. They write their CSS in HTML code of the page, like this:
<html>
<head>
<title>My Page</title>
<style>
A
{
font-family: Verdana;
font-size:8pt;
color:black;
text-decoration:none
}
</style>
…..
What is wrong with this technique? Well, imagine that you have site with more than 50 pages. One day, you decide that you want to change font color and colors of the links on your site. You will have to edit ALL the pages on your site, and do to that you will need time, because you place your CSS in your web page.
Better way is to save your visual attributes in separate, external CSS file, and to link that file with your page like this:
<html>
<head>
<title>My Page</title>
<link href="myStyle.css" rel="stylesheet" type="text/css">
….
Using this technique, you can change the look of your site within minutes, regardless of the number of pages, because your visual attributes are saved in ONE external CSS file. Edit that file, and you are done.
Benefits
Which are the benefits of using CSS? List is quite long and I will list here only the most important.
* Your web page will load faster
* Web page will become more search engine friendly
* You can change you site appearance within minutes
* You can write separate CSS file for handheld devices which will be called up instead of the regular CSS file
* You can forget about creating printer friendly version of your site using separate CSS file when user chooses to print the web page.
Avoiding standard HTML commands like:
<font color="#0000ff"><font size=2>Product</font></font></font>
will help us to reduce file size, but that is not the only benefit. Using CSS word product in this example will be moved more close on the top of the document. Search engine will pick up more content and less code.
Imagine that you have 3 columns table on your page. When you see the code, you will notice that first come code for your table, and after that it come your content. Positioning your 3 columns using CSS instead of standard inline elements:
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="381" height="150" valign="top" bgcolor="FFEDD4">
My Product
</td>
<td height="150" valign="top" bgcolor="FFEDD4">
…..
When CSS is used, your code might look like this:
<div id="leftcontent">
My Product
</div>
Again your code is much more clear, and your content is moved on the top of your document, making your HTML page search engine friendly, and reducing your file size.
Content is one of the most important factors in Search Engine Optimization, and you will benefit with removing the unnecessary code in your HTML and create search engine friendly web page.
Validate it
Browser war is far behind us. Reality is that most of the people today use Internet Explorer, but you should try to be on safe side and ensure that your CSS code is valid. Not all browsers interpret the CSS on same way. You can validate your CSS here: http://jigsaw.w3.org/css-validator/
CSS - Maximum Benefits
September 24, 2005
|
|
Zoran Makrevski is founder and CEO of SEO.Goto.gr.
Since 1998 has focused on E-Commerce and attempts to bring more traffic to the customer sites bring him in the SEO industry, and he is running his own company today.
Search Engine Positioning Firm
SEO.Goto.gr
Lastest Headlines for "Web Development"
- Software aids Web content development for mobile devices. (ThomasNet)
BREW® Mobile Platform expands mobile application and Web content developer capabilities, enabling them to create rich applications and Web content in Adobe Flash® for BREW environment and mass market handset platforms. It extends BREW Client services and APIs with platform capabilities, multimedia and content support, device database access, connectivity support, and touchscreen UI development. ... - New Web site online for IDF (The Daily Iberian)
The Iberia Industrial Development Foundation launched a new and, what Executive Director Mike Tarantino said is an improved Web site. “This is phase one of the new site,” Tarantino said. “Our previous Web site had been very stagnant. - CPP, Inc.'s Interactive Web Community for Independent Consultants Surpasses Membership of 1,000 (PR Newswire via Yahoo! Finance)
CPP, Inc., an industry leader in research, training, and organizational development tools including the Myers-Briggs Type Indicator® instrument, today announced that its ICON Success Program -- an interactive Web community for independent consultants in management training, coaching, and organizational development -- has surpassed its goal of 1,000 members. - Dell Links up With Salesforce's Development Platform (PC World)
Dell has signed a three-year deal to use Salesforce's Force.com platform for custom development. - State warns of unemployment claim Web sites (The Capital Times)
The state Department of Workforce Development is warning Wisconsin residents to be wary of Web sites that charge fees to file for unemployment benefit claims. The only agency that accepts unemployment claims is the DWD, so there's no need to use other Web sites, said department secretary Roberta Gassman. "We help individuals file their claims absolutely free," Gassman said. "Going to one of ... - Comcast To Bring Web-Style 'Widgets' To TV With Intel (MultiChannel News)
Comcast is teaming with Intel on a technology the companies said will let developers use Web application tools to quickly write interactive TV “widgets” that can serve up in Internet content and social networking features. - WaveMaker 4.0: one-stop web app creation (MacNN)
The folks at WaveMaker think big, calling their Visual Ajax Studio 4.0 web app development tool "a fundamental breakthrough" -- and they may just be right. In a demonstration for MacNN it took about three minutes to build a simple database web app -- something that traditionally takes a team of developers to manage the complex weaving of web and s... - Dell links up with Salesforce's development platform (InfoWorld)
Dell has reached a three-year deal with Salesforce to use the latter's Force.com development platform to build software for its "entire global workforce," according to Salesforce CEO Marc Benioff. The deal is the largest ever for Salesforce, Benioff said during the company's earnings call on Wednesday, according to a transcript . He did not disclose the financial terms. [ Learn more ... - Rwanda: Community-Led Development Programmes Recommended (AllAfrica.com)
The Rwanda Initiative for Sustainable Development (RISD) Tuesday urged development partners in the country to let people at grassroots level own their development plans in order to improve their livelihoods. - Intel Readies Development Tools For Multicore Programming (InformationWeek)
The tools are geared toward development on Intel's current dual- and quad-core offerings, and for the upcoming multicore graphics processor, code-named Larrabee.