CSS
CSS is a style sheet language used to describe the presentation of HTML content to incorporate additional style and layouts to a website. Our Hangout Notes cover best practice recommendations for utilizing CSS, with advice and examples from Google.
Don’t Prevent Embedded File caching
If you prevent JS, CSS and image caching, such as a nocache header tag, Google will need to keep requesting the files for rendering, which may slow down crawling of the site.
Fetch & Render Shows Results for a Googlebot and Browser User Agent
The Fetch and Render tool shows you 2 different renders, one for Googlebot which used the Googlebot user agent, and one for users which used a browser user agent. If JS/CSS is disallowed for Googlebot, it may not be able to render all the content in the same way.
Redirect Image, JavaScript & CSS URLs
When you redevelop or change your website platform, you should also redirect all your images, JavaScript and CSS files as well so the new URLs can be discovered more quickly.
CSS and JS Crawling Is Important for Mobile Compatability
Allowing your CSS and JavaScript files to be crawlable does affect desktop pages, but is more important for mobile pages as they need to test for mobile compatibility.
Disallowed CSS/JS Is a Problem If It Prevents Rendering
Disallowed CSS and JS is only an issue if it actually prevents Google from finding visible content, or rendering pages correctly. Other JS files don’t matter so much. There aren’t any penalties or anything like that.
Text Position on Page Doesn’t Matter for Relevancy Matching
Moving text to the start of HTML, then moving with CSS would be pointless. Keyword density isn’t relevant, write naturally.
Google Needs to Be Able to Crawl CSS and JavaScript
Don’t block your CSS and JavaScript from being crawled.