0
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

and

<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />

I know these are used more often then others but how do I know which ones best suit my site?

Possible List of others?

Possible better ones to suit my site?

Thanks, Regards X

5
Contributors
6
Replies
7
Views
9 Years
Discussion Span
Last Post by OmniX
0

Ya I have read there are different declerations for HTML and XHTML.

But I only have HTML and on another site PHP are there any recommened ones or is it just straight forward using loose, strict, etc.

0

It's down to how hte Browsers tend to repond - DocTypes tend to act as "how to read this" instructions to the Browser.
You'll find things like Quirks mode and the Box model in IE are different than Strict mode and the Box Model (look it up).


There is also "personal preference" too... I know some folks that refuse to move from html 4.01... saying it does everything it needs to, and XHTML is simply a pointless extra step.

0

While I know it's not proper form, you can skip using DOCTYPE and META TAGS. META TAGS no longer help with SEO, at least with Google, as they have stopped allowing people from doing this because they would put in a whole bunch of unrelated keywords to get traffic. I would recommend putting the crucial information in your title, and a description at the top of the page.

As for DOCTYPE, you can continue to use it, and it's not harmful. It only can behoove you, not disadvantage you.

0

Both are required to make the page validate with the W3C. Validation is a very good way to troubleshoot a malfunctioning page. It also makes the employers happy if you can make valid pages.

That meta tag is not used to guide search engines, but to tell the browser what character set to use. It is required for validation.

0

Midimagic just summed up what I was going to say.

I never liked using doctypes or meta tags (the extra code) but I realized over the last week its a curcial point that you need them if you have any commerical websites as it would have to be viewable on any browser.

So I am just using strict doctype at the moment and seems to work good with both browsers at the moment.

Also allowed my CSS code to be optimized, which was my intial intent on using doctypes.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.