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?

5
  • Outside of lang= defining the language there is no role for any of these tags.
    – closetnoc
    Commented Jul 13, 2018 at 5:28
  • What do you mean? sorry I don't quite get it. Commented Jul 13, 2018 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
    Commented Jul 13, 2018 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. Commented Jul 13, 2018 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
    Commented Jul 13, 2018 at 9:40

1 Answer 1

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 agree to our terms of service and acknowledge you have read our privacy policy.

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