1

We're working on redesigning our full website, we have a critical impact on our business from SEO. We are trying to use a lot of formatters, spacers, etc classes from SASS like suggested by bootstrap. Here is a sample :

<div class="col-12 col-md-5 offset-md-2 br-shadow br-bg-light p-a-xl br-primary br-lg-secondary">some content</div>

Here all classes are useful and provide unique various styles to our page and are all re-used multiple times on each page, not always together.

What do they do this?

.col-12 => bootstrap
.col-md-5 => bootstrap
.offset-md-2 => bootstrap
.br-shadow => provides shadow
.br-bg-light => defines background color to our "light" color
.p-a-xl => provides "xl" padding to all sides
.br-primary => defines text color to our "primary" color by default
.br-lg-secondary => defines text color to our "secondary" color when on large screen

Style is more maintanable like this, less side effects. CSS static files are more lights... but HTML becomes a lot more and more verbose and fat of course.

Is it preferrable to have 50KB of HTML and 10KB of CSS (in separated files) or to have 40KB of HTML and 20KB of CSS (in separated files) ?

1

That has no effect on SEO. That's just the result of using a CSS framework which has preset classes that are well organized and easy to use. Hundreds of thousands, possibly millions, of websites use Bootstrap and frameworks like it with no ill effects.

  • I think, you misunderstood me or I just express my problem badly. It was not about the effect of using bootstrap on my website, not at all. It was just about that we're creating a lot of spacers-formatters classes instead of just programming specific classes for specific html nodes "as usual". For me, our code looks like more and more as we were coding style inline, except that we can use variables. So HTML become more and more heavy instead of CSS which become lighter. Is it better to have a heavy HTML or a heavy CSS ? If you have to choose – MathKimRobin Jan 23 at 12:47
  • That is what I am covering in my answer. All of those class names do not affect SEO and are a natural part of using a framework. There's no difference from an SEO standpoint if you use a lot of CSS or little bit of CSS. It's the content that matters.You should probably use the CSS frameworks because they make it faster to develop your website. – John Conde Jan 23 at 13:05
  • Again, misunderstanding between us. It's not about how to name the class or if you have to use or not a CSS framework. It's about that you can choose to overweight your html by using a lot of very basic css classes or overweight your css static external file by be more precise for non-basic bootstrap. I already know that you can name your classes how you want it will have no effet. is it preferrable to have 50KB of HTML and 10KB of CSS (in separated files) or to have 40KB of HTML and 20KB of CSS (in separated files) ? – MathKimRobin Jan 23 at 13:21
  • It doesn't matter. That's the bottom line. Do whatever makes your development life easier. Neither option is going to affect SEO. – John Conde Jan 23 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.