954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

DOCTYPE and META TAGS

<!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

OmniX
Practically a Master Poster
656 posts since Dec 2007
Reputation Points: 31
Solved Threads: 10
 

Do you have pages coded in HTML, or XHTML ?

Learn the difference :)
http://w3schools.com/xhtml/xhtml_html.asp

lio04
Junior Poster in Training
78 posts since Mar 2008
Reputation Points: 27
Solved Threads: 4
 

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.

OmniX
Practically a Master Poster
656 posts since Dec 2007
Reputation Points: 31
Solved Threads: 10
 

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.

autocrat
Posting Pro in Training
431 posts since Feb 2005
Reputation Points: 63
Solved Threads: 12
 

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.

RyanLeaf
Newbie Poster
14 posts since Apr 2008
Reputation Points: 10
Solved Threads: 1
 

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.

MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182
 

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.

OmniX
Practically a Master Poster
656 posts since Dec 2007
Reputation Points: 31
Solved Threads: 10
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You