Which one is best for SEO?

May I use Inline HTML Tags such as for image img , for making bold by strong etc. tags.

Or
CSS classes such like below

.class {background-image: url(images/clipping_path_india_logo.png); } .class {font-weight: bold}; ?

Just need which code should I use to design a website with SEO benefit properly ?

Thanks and I’m waiting for your proper guideline.

Both are best for SEO depending on whether you are marking up content or decoration.

The HTML should define as semantically as possible what the content is. The CSS should define how you want it to look.

2 Likes

felgall, Thanks for your answer. Sorry for bothering you again. Actually I just wanted to say that, As I know we can place an image through html or css, And also there has some tags in HTML which are available in CSS as an alternative. Such as STRONG in html , BOLD in CSS. [Both are going to make a result similar]

In these case, Which code whether html or css will I prefer to design my site through seo perspective? Once again Sorry for this question…

@bijutoha

Styling should get out of the way from structure. That’s why elements like b (for bold) were removed. They’re not semantic.

Strong is semantic when used appropriately, so that’s why it is in the scope.

Placing a background image is not semantic, it is just adding beauty and styling to the design. Therefore, it should be in your CSS file.

So, what does this have to do with your question?

Everything. Stop thinking about SEO and start thinking semantically because there’s not better code for SEO than semantic code

4 Likes

Thanks molona! thanks for your details. I’m clear, Now.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.