Efficient CSS Selectors
-
How much practical impact do inefficient CSS selectors have on page speed?
-
Hi Brett,
Poorly written CSS selectors do not have much, if any, impact on site speed. I've never seen an issue where bad CSS changed the load of a page I was working on. That said, writing clean CSS can be helpful in a lot of other areas, including code maintainability.
There is a good article on this that you might find interesting: http://css-tricks.com/efficiently-rendering-css/
I hope that helps.
Matthew
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Content that's behind CSS..
For content that's been loaded onto the page.. but it requires a click for it to be revealed.. as in a slider, or a tab, to save space or for a page's organization.. what are your thoughts on Google counting or weighting this content? It would make sense for Google to give it partial or no weighting as if Google attributes the content to being there, its confusion for the user to land on the page and have to find it/click around to find it.. Sorry if this is an obvious question to SEOs.. I've always assumed as long as it was loaded, it'd be mostly counted.. but I'm beginning to doubt my assumption. Thanks!
On-Page Optimization | | speedcommerce0 -
Is it better to put all your CSS in 1 file or is it no problem to use 10 files or more like on most frameworks?
Is it better to put all your CSS in 1 file or is it no problem to use 10 files or more like on most frameworks?
On-Page Optimization | | conversal0 -
Having a terrible time ordering the CSS Styles and Scripts in my header
Hi Guys, I am having a terrible time trying to get the correct optimized (for speed, none blocking etc) order for loading my external css and JS. I follow the recommendations from Google Page Speed or Chrome Audit and it seems no matter where I move the CSS file too (top or bottom) it complains about more blocking and stopping rendering of the page. My URL is http://www.MyFairyTaleBooks.com if some smart person out there could help me figure out what I am doing wrong and the order in which my should be organized I'd appreciate it! Oh I'm not a developer but I can re-arrange text in a file! 😉 Thank you!
On-Page Optimization | | MyFairyTaleBooks
Dinesh0 -
Does css float affect SEO?
It is generally believed that the closer the content is to the top of the page, the better it is for SEO. If that's incorrect, please let me know. I have a 2 column site where the left menu is navigation and right side is content. Obviously, the left menu appears in the code before the content does, but I can flip them around via css float. If I do that, the content will appear on the left visually, even though in the code it still comes after the left side navigation. Do either positions affect seo?
On-Page Optimization | | cmp1010 -
CSS family names and whitespace
A CSS validation notes the following: Family names containing whitespace should be quoted. If quoting is omitted, any whitespace characters before and after the name are ignored and any sequence of whitespace characters inside the name is converted to a single space. Not sure what this means or how to fix. Help. thanks
On-Page Optimization | | casper4340 -
Combining CSS
One recommendation from a page speed analysis of my site was to combine CSS (external style sheets) but after reading more on the topic others say that this is not always best. Any thoughts on either approach?
On-Page Optimization | | casper4340 -
External vs inline for CSS menu
Which is better for search engines: external or inline menus? And which language: CSS, Javascript, or both?
On-Page Optimization | | teatable0 -
CSS background images weight impact
Hi,
On-Page Optimization | | GianniCuccu
do you think that the use of a single 1.8Mb background image sitewide could have a big negative impact and make a website disappear from SERPS? thank you0