|
CSS stands for "cascading style sheets". The World Wide Web Consortium, also referred to as W3C, defines CSS as follows: "Style sheets describe how documents are presented on screens, in print, or perhaps how they are pronounced [...] By attaching style sheets to structured documents on the Web (e.g. HTML), authors and readers can influence the presentation of documents without sacrificing device-independence or adding new HTML tags." "Cascading Style Sheets (CSS) is a style sheet mechanism that has been specifically developed to meet the needs of Web designers and users." (http://www.w3.org/Style/)
How style sheets work? First, you define a style. For instance, you want to define text as deep blue 12px size Verdana font in bold: Color: #5500DD; Font-size: 12px; Font-family: Verdana; Font-weight: bold; Next, we give this style a particular custom name (further referred to as "class"): Mystyle { Color: #5500DD; Font-size: 12px; Font-family: Verdana; Font-weight: bold; } …or, alternatively, we associate it with a particular HTML tag: h1 { Color: #5500DD; Font-size: 12px; Font-family: Verdana; Font-weight: bold; } Styles can be declared in the HTML document itself with the help of the <style> tag anywhere in the document. However, it's preferable to keep them out of your page in a separate file with the ".css" extension ("mystyle.css") to further reduce the size of your HTML file. To be able to use the styles declared by that file in your HTML document, you must provide a link to "mystyle.css" within the HEAD area of your html document: <link rel="stylesheet" href="mystyle.css"> With the link described above in your HEAD area, all HTML tags that have styles defined for them in the "mystyle.css" will yield these styles when shown in browser. How CSS can help with optimization? Imagine there's some HTML code used to print a heading on your page: <strong><font color="#FF0000" size="24px">Main Heading of My Site</font></strong> Now look how the same effect can be achieved using styles: <span class="mystyle"> Main Heading of My Site </span> The HTML code for the CSS tag is half as long as the code without the CSS. This, as you already know, is an advantage with search engine spiders as it can give more weight to your content because of the improved content-to-code ratio. And even better: <h1> Main Heading of My Site </h1> (with a <link rel="stylesheet" href="mystyle.css"> in the HEAD and provided a style is declared for the H1 heading in “mystyle.css”). Using CSS, we will avoid accusations of spamming because it's invisible to search engine that we are trying to present different things between spider and human visitor. We also reduce to a minimum the size of our HTML code and provide the best opportunity to effectively use keywords in important HTML heading tags (h1,h2, etc.) . Javascript Rollovers Rollover menu effects are very popular. However, they commonly require JavaScript implementation. Fortunately, rollovers can be made via CSS that do not require any scripting and are fully readable by the spiders. CSS lets you avoid using JavaScript and still emulate rollover effects with grace in a small file, but one of the greatest benefits is providing more textual content for spiders to read. Using CSS to dictate rollover effects instead of separate images will give you an effective advantage in the search engine battle, especially if the textual links are your key phrases. Cascading Style Sheets (CSS) are well known for their design capabilities and are a perfect solution to improve your content-to-code ratio. So we strongly recommend study CSS and how to use it, and then use CSS to significantly enhance your SEO campaigns. Is CSS spam? There is no evidence that search engines notice it when you use CSS to define your page layout. In fact, adjusting your page's visual look with CSS won't be defined as spamming unless you try to use "display:none", "visibility:hidden" or similar definitions to hide sections stuffed with keywords. Such actions are definitely spamming and are not recommended. In summary, CSS is a great resource for Search Engine Optimization because they allow you to present your content in a way that keeps both visitors and search engines happy.
|