How Important is it to have a doc type in your website?

  • lrosan
  • Born
  • Born
  • No Avatar
  • Joined: Aug 08, 2006
  • Posts: 1
  • Loc: Washington DC
  • Status: Offline

Post August 8th, 2006, 1:56 pm

Hi, I'm new to the forum scene, and I recently had a website created for my small business, however they're not showing up in the search engines too well. I asked around and read up on the subject and it was brought up to my attention that our webpage doesn't have a "doc type". How important is it to have something like that in the website? Any suggestions help! Thanks!
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 8th, 2006, 1:56 pm

  • lioness
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Jun 23, 2004
  • Posts: 1615
  • Loc: Boston MA
  • Status: Offline

Post August 8th, 2006, 9:04 pm

Here is a good description of what a DOCTYPE is, and what it is used for http://www.w3.org/QA/Tips/Doctype.

I always use valid DOCTYPES, at least for validation of my sites code - however I doubt if your SERP issues are result of your site not using them.

You might find your answer down in one of the SE forums below (Google, Yahoo, MSN or Search Engine)
  • Yushatak
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Aug 05, 2006
  • Posts: 9
  • Loc: usa
  • Status: Offline

Post August 9th, 2006, 9:51 am

In order to get into Google, which is the only one I really cared to get into, it required no doctypes. I have always thought doctypes were a bit pointless and since this was my own personal site of course didn't bother with anything I deemed pointless :D. Anyway I successfully got into Google by two things:

1. Submission to the crawler
2. Posting links to my site on already-googlable sites

When a crawler gets around to it, it will eventually scan your site. I didn't have the patience, so I hurried things up by posting my link on forums and stuff that were already on Google, so that when it reindexes them, it leads them into my site. This will not work on all sites, but some it will. I don't know whether it even helped me, but I got my site onto Google in just a month or two.

My site is http://yushatak.com/ btw, if ne1 wanted to look.
  • Bogey
  • Disturbed
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 7134
  • Loc: Ozzuland
  • Status: Offline

Post August 9th, 2006, 10:08 am

According to the description of the doctype of W3C, it is reccomended that you use a doctype, not only to get onto search engines faster, but to have less trouble with mistakes on your site, because the doctype declares which version of HTML you are using so there won't be any confusion between the site and the computer,

With a doctype you will get on the search engine faster and you will have less trouble if you put in the doctype, and if you put in the correct version on the doctype and how the computer should read the document.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

The above doctype is strict and html version 1.0. That would get the site with that doctype to work properly if the html version is correct and get it faster on the search engine.

There are also transitional for how the computer should render the document, it means that the document goes between strict and frameset. There is also loose.

You could get better toutorial or an "info page" on it on http://www.htmlhelp.com/tools/validator/doctype.html

So, in other words I advise you to put on the doctype, it wouldn't hurt you, it would actually help you since it lessens your pains with document problems like mistakes of reading, it would tell the computer how to read the document, it would tell the computer which kind of a translator to use to translate the words into images and it would get you faster on the search engine.

Hope that this helped you.
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
  • Bogey
  • Disturbed
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 7134
  • Loc: Ozzuland
  • Status: Offline

Post August 9th, 2006, 10:09 am

Also, http://www.htmlhelp.com/tools/validator/customdtd.html tells you how to make a costum doctype, kind of neat.
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
  • grahamr
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Aug 04, 2006
  • Posts: 59
  • Loc: North-East, England
  • Status: Offline

Post August 15th, 2006, 8:21 am

Bogey wrote:
According to the description of the doctype of W3C, it is reccomended that you use a doctype, not only to get onto search engines faster, but to have less trouble with mistakes on your site, because the doctype declares which version of HTML you are using so there won't be any confusion between the site and the computer,


Actually a doctype is mandatory: There must be a DOCTYPE declaration in the document prior to the root element. The public identifier included in the DOCTYPE declaration must reference one of the three DTDs found in DTDs using the respective Formal Public Identifier. The system identifier may be changed to reflect local system conventions.
  • lioness
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Jun 23, 2004
  • Posts: 1615
  • Loc: Boston MA
  • Status: Offline

Post August 17th, 2006, 5:44 am

grahamr wrote:
Actually a doctype is mandatory


Well not exactly - pages do show up without them. Personally though, I wound't be seen without one :D
  • grahamr
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Aug 04, 2006
  • Posts: 59
  • Loc: North-East, England
  • Status: Offline

Post August 17th, 2006, 6:38 am

Check the terminology:

1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the definition is an absolute requirement of the specification.

2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the definition is an absolute prohibition of the specification.

3. SHOULD This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.

4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that there may exist valid reasons in particular circumstances when the particular behavior is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behavior described with this label.

-----------

These admittedly are from the RFC specs but their meaning is the same regardless: If the spec says you should have one, anyone who says any different is wrong, regardless of whether it works without one or not.

<rant>Which is why opensource frameworks (Struts, Spring, etc.) and IDE's (NetBeans) annoy the hell out of me when they don't even bother to generate correct (x)html, even after several years of work.</rant>

G.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 22502
  • Loc: Pittsburgh PA
  • Status: Online

Post August 17th, 2006, 6:57 am

ulstermonkey wrote:
grahamr wrote:
Actually a doctype is mandatory


Well not exactly - pages do show up without them. Personally though, I wound't be seen without one :D


Browsers have built in doctypes. If one is not included in the code, the browser defaults to using their own built in one. That's one key reason why people that don't use them in their code have trouble with crossbrowser compatability. IE's built in doctype is most definitely not the same as Mozilla's.
"The web is a dominatrix. Every where I turn, I see little buttons ordering me to Submit."
Play sports pools and discuss sports topics at Boasting Rights Sports Forum
Get paid to write articles - www.associatedcontent.com
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 22502
  • Loc: Pittsburgh PA
  • Status: Online

Post August 17th, 2006, 7:02 am

Additional information. The doctype is a "switch" so to speak, to switch the browser into strict standards compliance mode. Here's what Microsoft says about it:

Quote:
This declaration must occur at the beginning of the document, before the html tag.

The !DOCTYPE element does not require a closing tag.

This element is available in HTML as of Microsoft Internet Explorer 3.0.

You can use this declaration to switch Internet Explorer 6 and later into strict standards-compliant mode. You turn the switch on by including the !DOCTYPE declaration at the top of your document, specifying a valid Label in the declaration, and in some cases, specifying the Definition and/or URL. The following table shows when standards-compliance is on or off.
DOCTYPE URL Present URL Not Present
No DOCTYPE present off off
HTML (no version) off off
HTML 2.0 off off
HTML 3.0 off off
HTML 4.0 on on
HTML 4.0 Frameset on off
HTML 4.0 Transitional on off
HTML 4.0 Strict on on
XHTML on on
XML on on
Unrecognized DOCTYPE on on
Note In standards-compliant mode, compatibility with other versions of Internet Explorer is not guaranteed. When standards-compliant mode is switched on, the rendering behavior of documents may be different in later versions of Internet Explorer. You should not use this mode for content that is fixed in nature, such as content that is burned on a CD.


http://msdn.microsoft.com/workshop/auth ... octype.asp
"The web is a dominatrix. Every where I turn, I see little buttons ordering me to Submit."
Play sports pools and discuss sports topics at Boasting Rights Sports Forum
Get paid to write articles - www.associatedcontent.com
  • lioness
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Jun 23, 2004
  • Posts: 1615
  • Loc: Boston MA
  • Status: Offline

Post August 17th, 2006, 8:43 am

grahamr wrote:
Check the terminology:


<endof>Check ATNOs posts above :wink: </endof>
  • grahamr
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Aug 04, 2006
  • Posts: 59
  • Loc: North-East, England
  • Status: Offline

Post August 17th, 2006, 9:03 am

Who created the HTML specs? W3C or Microsoft?

You can't argue against the terminology: It says MUST so inclusion of a DOCTYPE is mandatory.
  • lioness
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Jun 23, 2004
  • Posts: 1615
  • Loc: Boston MA
  • Status: Offline

Post August 17th, 2006, 10:45 am

grahamr wrote:
Who created the HTML specs? W3C or Microsoft?

You can't argue against the terminology: It says MUST so inclusion of a DOCTYPE is mandatory.


Try it - make a page without a doctype :wink:
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 22502
  • Loc: Pittsburgh PA
  • Status: Online

Post August 17th, 2006, 3:35 pm

The key here is whether or not the designer wants to conform to the w3c standards. I've always had a hard time understanding designers that don't. The whole purpose of the w3c is to create standards that we can work by so that we don't have to have problems designing for one browser or the other.

Problem is designers (and web browser creators) seem to be a stubborn lot. Everybody wants to do things their own way.

Think about it. What would happen if a few rogue engineers decided they didn't want to conform to the IEEE standards. They think a firewire should be made "this way" because it's easier. Well, OK, it might be easier, but nobody's going to be able to use it.


If you choose to code to the strict standards specified in the w3c, then you MUST use a doctype, and technically the browser MUST parse it according to the standard.

If you choose not to code according to standards, then toss the DTD and deal with your own problems you've created for yourself. Don't come crying to momma when it doesn't work right.
"The web is a dominatrix. Every where I turn, I see little buttons ordering me to Submit."
Play sports pools and discuss sports topics at Boasting Rights Sports Forum
Get paid to write articles - www.associatedcontent.com
  • grahamr
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Aug 04, 2006
  • Posts: 59
  • Loc: North-East, England
  • Status: Offline

Post August 18th, 2006, 1:33 am

ulstermonkey wrote:
grahamr wrote:
Who created the HTML specs? W3C or Microsoft?

You can't argue against the terminology: It says MUST so inclusion of a DOCTYPE is mandatory.


Try it - make a page without a doctype :wink:


You are saying that a doctype isn't mandatory because it works without one.

I am saying a doctype is mandatory despite the fact it works without one because the specs say so.

The whole reason browsers work with them is due to the fact that a browser could be asked to display html 1.x or 2.x which were (iirc) doctype-less. This is also why browsers display XHTML even though a lot of them don't actually validate (pages with 'XHTML valid' logos when they don't validate also annoy me) despite the fact that according to the specs any malformed XML document should be discarded by the client. If they displayed nothing then a lot of websites would be blank.

G.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 18th, 2006, 1:33 am

Post Information

  • Total Posts in this topic: 27 posts
  • Users browsing this forum: No registered users and 225 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.