I am somewhat confused with what DTD declaration/!DOCTYPE to use on my site. Currently I have none and it appears to view just fine on Firefox, Chrome, and IE but everything I am reading says you need to have one. Is there a general rule of thumb that you use in determining what DTD to use?
I located this source of info but I wasn’t sure if my site is considered HTML or XHTML so I didn’t know what to go with. How to I determine this?
If you don’t know we, cannot know either… what did you write XHTML or HTML markup? Without seeing a page example or a live page we have no way of being able to tell you either way.
You need to specify a doctype on each page otherwise at least IE will go into quirks mode.
You really should use a STRICT doctype for either html or xhtml. There is no justification for using a TRANSITIONAL doctype for new or recent websites.
If you can’t or won’t post your code or a link to it, you can put both doctypes (one at a time) on a page and see which page has fewer errors on the W3C validator. Then fix the code in the page for that doctype until all the errors are gone.
Except that if the page doesn’t have any html5 specific elements, then the html5 doctype declaration is really meaningless and causes markup validation issues. html5 is by no means finalised and will be in development for at least a few more years and even the w3c validator says its html5 validation results should not be relied upon
Go with the HTML4 Doctype for that. Font tags? Not good. Keep XHTML off it.
Regarding your SEO:
The title tag is way to long. Search engines will see through the keyword stuffing (probably) and browsers won’t display that much text. Doesn’t read well for users anyway.
Meta keywords are ignored.
Meta description is too long. I hear a max of 160 chars thrown around often.
…having said that one thing HTML5 does do is specify (in the spec) how browsers should handle invalid markup (proper errors such as incorrectly nested tags).
Previously it was up to individual browsers to decide how to construct the DOM from bad markup. If you’re at risk of these errors HTML5 is probably the better choice.
That doctype is for web sites created bac k in the 20th Century that haven’t yet finished getting rid of the HTML 3.2 tags. You shouldn’t use it for new sites.
If using a strict doctype displays the page incorrectly then you have not coded the CSS the right way to get what you want.
You should fix the CSS to correct the way the page displays rather than moving back into the 20th Century with an old doctype.
What I meant about the meta keywords is that search engines do not consider them at all when ranking a site, or determining the page content. They are very easily faked because users never see them, so have had zero weight on search results.
You can drop them and save a little bit of page size.
Unless you decide to implement a script on your own site that uses them. If you do that then the meta keywords tag will be used because you are using it yourself.
Unless you implement something yourself that uses it though it is a complete waste of space being there as too many sites abused its intended use with search engines in the past and so the search engines now all ignore it completely.
It’s not really a specifically HTML5 doctype, though, but a doctype that can be used with any version of HTML. And it’s nice and simple. I don’t see any reason not to use it.
I think his point there is that the rules for that new doctype are very forgiving, turning a blind eye to HTML practices that are not allowed in XHTML (such as non-closed elements). But I guess I shouldn’t speak for DS.