user1097772
user1097772

Reputation: 3529

Html 5 <footer> vs <div id="footer"> search robots stupidity

My colleague who work with me and is responsible for SEO on pages slightly force me to use <div id="footer"> instead of new <footer>, cause saarch robots supposedly works better with the <div id="footer">.

I won't ask what is better to use cause I don't want to have question which doesn't fit SO rules. I better ask what are advantages and disadvantages of these two approaches?

My research:
I think <footer> is better from Semantic Web view hence it's better.
I read some articles about HTML5 and new elements which brought me to use <footer> instead of <div id="footer">.

Upvotes: 1

Views: 7521

Answers (2)

Jarrod Juleff
Jarrod Juleff

Reputation: 85

I know this is old, but the <footer> element (to quote spec):

The <footer> element represents a footer for its nearest ancestor <main> element or sectioning content or sectioning root element. A footer typically contains information about its section, such as who wrote it, links to related documents, copyright data, and the like.

A <footer> element can also contain entire sections representing appendices, indexes, long colophons, verbose license agreements, and other such content.

When a <footer> element’s nearest ancestor sectioning root element is the <body> element, and it is not a descendant of the <main> element or a sectioning content element, then that <footer> is scoped to the <body> element and represents a footer for the page as a whole.

TL:DR; A footer element can be in any element. It can be an article footer, and is only treated as a main site footer when it's parent element is the body tag. It also means you can have more than 1 footer element in a site.

Adding id="footer" identifies it as the footer for the main site, and not an article footer. Not sure how it being a div or a footer tag affects seo however, as I suspect seo parsers look for an element with "footer" as the id, and ignore the container type if it's found.

Upvotes: 1

RichardB
RichardB

Reputation: 2767

The only possible logical reason I can see why this could possibly be true is if Google see "<footer>" as a footer, but "<div id='footer'>" the same as other content on the page.

As a footer should just be part of the template, rather than the content, they may use that tag to say that they should not index text within it as that page's content.

However, even if that is true, I can't see how that would impact on SEO.

It seems many SEOs like to tweak things with no rationality or evidence. Other SEOs would no doubt tell you that the footer is duplicate content and so should be removed altogether.

It should really be up to your SEO to give reasoning why it works and why it is worth the impact upon code quality.

Semantic code should help search engines index your pages correctly - it tells them what everything is.

Upvotes: 3

Related Questions