9

For example, if I wrap my content with <div> tags (for no reason, just for arguments sake), would that cause a difference to search engines? Does thinner markup improve SEO?

<body>
    <div>
        <div>
            <div>
                <main>
                    <p>Text text text text text...</p>
                </main>
            </div>
        </div>
    </div>
</body>

versus

<body>
    <div>
        <main>
            <p>Text text text text text...</p>
        </main>
    </div>
</body>

versus

<body>
    <main>
        <p>Text text text text text...</p>
    </main>
</body>

From an SEO standpoint, are these all equal or not?

3 Answers 3

6

In SEO perspective wrapping contents with <div> tags is not an issue but large amount unwanted coding will increase the bytes of data which may increase the PageSpeed. Here an extract from this source:

Compacting HTML code, including any inline JavaScript and CSS contained in it, can save many bytes of data and speed up downloading, parsing, and execution time.

Since PageSpeed is one among the ranking factor in Google, using these unwanted <div> tags is not an appreciated one. See this news from Google official blog.

2

Another problem with a code-heavy site is it takes the search engine spiders longer to crawl your pages. Even if bloated code does not affect page load time (from the visitor's perspective) the longer crawl time can negatively affect how the search engines rate your site. (It's not a major signal but every little bit helps.)

From SearchEngineGuide.com:

Clean and lean code can improve website performance issues more than most people think. Bloated code can slow down both spidering and page download, both of which can have an impact on a site's search engine rankings.

0

From an SEO perspective the examples you give are the same. I would suggest you look into using the semantic elements introduced with HTML5 such as:

enter image description here

<article>
<aside>
<details>
<figcaption>
<figure>
<footer>
<header>
<main>
<mark>
<nav>
<section>
<summary>
<time>
3
  • Is there any advantage to using these tags? From an SEO perspective Google doesn't care. Last time I checked some versions of IE didn't support them at all. Based on that, I'd recommend sticking with divs and spans. Jun 30, 2017 at 9:16
  • There is no evidence that using the new HTML5 tags will gain anything from an SEO perspective. It does help reduce 'code bloat' and has other benefits. For a good article read: searchengineland.com/… Jun 30, 2017 at 22:53
  • I read that the new <main> and <article> tags help SEO since they clearly indicate (or should) where the relevant content is. Jul 15, 2017 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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