Whats more important semantics or syntax when writing your code

Hi

When talking about SEO, what’s more important syntax or having your elements semantically correct as far as your HTML structure, or simply both?

Thanks

Both.

As far as SEO is concerned, semantics are more important, because they help googlegod to understand your contents. Unless you’ve really stuffed up the syntax to the extent that googlegod can’t work out what you were trying to say, it won’t be bothered - Google isn’t interested in being the W3’s policeman and arbitrarily penalising sites for bad code.

That isn’t to say that invalid code is OK - it isn’t, as a general rule - it’s far more likely to give problems with appearance or behaviour in some browser or other, current or future, if you allow validation errors to slip through.

Thanks a lot for the clarification!