0

I'd like to compare the two sites:

Site A:

<!DOCTYPE html>
<html lang=en_US>
<head>

Site B:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>

The differences are:

  1. Site A doesn't have " for tag attributes.
  2. Site A has a very simple !DOCTYPE tag
  3. Site A has a very simple html tag

I'm wondering, are the three factors important for SEO rankings?

  • Outside of lang= defining the language there is no role for any of these tags. – closetnoc Jul 13 '18 at 5:28
  • What do you mean? sorry I don't quite get it. – AGamePlayer Jul 13 '18 at 5:29
  • 1
    SEO is not about tags. It is about content. Short of the lang= in the HTML tag defining the language of the page, these tags have absolutely nothing to do with SEO. – closetnoc Jul 13 '18 at 5:38
  • Short of the lang= in the HTML tag defining the language of the page what do you mean by this“short of”? I'm still confused. – AGamePlayer Jul 13 '18 at 5:50
  • The Doctype stuff that is there tells the browser how to read the HTML. You will typically see strict 1.0 ones used in email, due to emails clients. <!DOCTYPE html> is HTML 5. you can find out more on common doctypes at w3 schools w3schools.com/tags/tag_doctype.asp – Jason Jul 13 '18 at 9:40
3

What you are asking is if HTML document type could affect SEO, right?. Based on my experience and logic I'll say no.

A site built to standards (valid HTML and CSS) is often easier to access and crawl by searchers but using different doctype will not boost your ranks cause accesibility it's not a direct SEO factor.

As long as you can check that Google renders your site correctly (without any error), nothing else in your code -from a tech point of view- should matter.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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