Cascading Style Sheets (CSS)

Cascading Style Sheets (CSS) are used to separate the stylistic elements of a page such as layout, colour and fonts from the content of the page such as paragraphs and images. We call this Separation of Content from Presentation.If you don’t understand CSS at all then you may decide not to use it for your site. However I would suggest that the advantages to be gained from using CSS, not just for Google, are well worth the time invested in learning it. For an introduction to CSS see W3C css introduction chapter.

So why is CSS good for Google?

CSS allows for smaller file sizesCSS allows you greater control of page structure

CSS allows for smaller file sizes

By taking styles out of the HTML page and putting it into a standalone (imported) style sheet (.css file), you can reduce the overall amount of code in your web pages. Pages with less code have smaller file sizes and Google prefers pages with smaller file sizes (many other search engines do too).

Though Google doesn’t offer specific advice on this matter, the search engine optimisation community is generally agreed that 100KB is a good upper limit for page sizes.

CSS allows you greater control of page structure

CSS allows you to structure your document according to HTML standards without comprimising the look-and-feel of the page.

Google rewards pages that are well structured, though many designers choose to ignore standards and guidelines as much as possible, because they (incorrectly) believe standards lead to bland pages. Using CSS, designers can create attractive pages with much flair, while adhering to the findability design principles identified in the book (yes you’ll have to buy it to get more!).

CSS allows you to hide content from browsers while it still gets picked up by Google

Using CSS you can hide content from certain browsers in certain situations. For example you may have some content that you only want to appear in print, or you may want certain content to only be shown on screen and not in print (such as page navigation). The advantage is that Google will still index all of the content and you will still get the benefit that content brings.

If you are new to CSS, be aware that different browsers still interpret CSS standards in different ways, while some (very) old browsers don’t read CSS at all. Ensure that your CSS is as cross-browser compatible as possible, and that your HTML pages look acceptable even without CSS

Join the Discussion

We are happy that you have chosen to join the discussion BUT we also have rules. Please keep in mind that all comments are moderated according to our privacy policy. Any links are nofollow. Do NOT use keywords in the name field you MUST leave a real name in order to get your comment approved. Spamming for a link will not be tolerated on this site so do not waste your time. Comments must relate to the post topic. This website is here to help people, not for your advertising purposes. Lets have a personal and meaningful conversation.

Your email address will not be published. Required fields are marked *