Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
Featured Web Site Template

Hundreds More at Free Site Templates.com!

Web Site Partners
Sponsored Links
Jet City Software
 
Whos Here ?
There are 0 guests and 1 members in the forums right now.
Reflects user activity within the last 5 minutes
Moderator(s): Prowler, jcokos
Member Message

Rob Cook
Joined: Dec 06, 1999
# Posts: 2007

View the profile for Rob Cook Send Rob Cook a private message

Posted: 2006-Jan-02 21:51
Edit Message Delete Message Reply to this message

Okay, I'm gonna come across like a right muppet here but here goes...

I've been designed websites (for myself) since 1999 and I have *NEVER* bothered to include a 'doc type' in the HTML. Never needed to and didn't see why I should bother when my sites worked fine in all browsers I tried and the search engines didn't seem to mind either.

Anyway. Reading stuff in various forums, it seems there is more and more encouragement to specify the doc type. So... I've decided to give it a try on one site (the one in my profile).

Thing is, I've done a bit of reading and can't work out exactly which doc type I should enter. Any ideas? I just use very basic design in HTML - no CSS or XHTML or anything like that. Works for me smile



encryptdesigns
Joined: Jul 15, 2005
# Posts: 22

View the profile for encryptdesigns Send encryptdesigns a private message

Posted: 2006-Jan-02 23:28
Edit Message Delete Message Reply to this message

Take a look here:

http://www.w3.org/QA/2002/04/Web-Quality

There are some nice examples on which doctype to use for certain scenarios. Hopefully that helps...



g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10465

View the profile for g1smd Send g1smd a private message

Posted: 2006-Jan-03 00:56
Edit Message Delete Message Reply to this message

If you don't know which you need then opt for HTML 4.01 Transational to begin with. It is the "most common" and the most forgiving of errors.


If you get serious with validation then you might want to move up to HTML 4.01 Strict later.

Older standards, like HTML 3.2 and earlier, are severely lacking in features, and should be avoided now.

The full DOCTYPE (for HTML 4 onwards) includes a w3c.org URL within it, and that triggers "standards mode" in modern browsers (and you need to be aware of "box model" implications in IE {non standard behaviour} when you start doing that).



There are serious issues with XHTML and validation, and with MIME types and browsers (especially IE) that put me off using XHTML for the forseeable future. XHTML also removes many tags and attributes from the specification (compared to HTML 4, that is), forcing you to use other methods.



g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10465

View the profile for g1smd Send g1smd a private message

Posted: 2006-Jan-03 01:03
Edit Message Delete Message Reply to this message

No CSS?

I am going to recommend that you strip out all your <font> tags and replace them with 10 lines of CSS in an external file - one file that every page of the site can access.

It unbloats code, makes updates so much easier, and is just easier to work with.

You need to make sure that your pages consist of headings, paragraphs, lists, tables, and forms; that all tags are closed; the pages validate as much as possible; and you have a DOCTYPE on the first line.



Rob Cook
Joined: Dec 06, 1999
# Posts: 2007

View the profile for Rob Cook Send Rob Cook a private message

Posted: 2006-Jan-03 01:50
Edit Message Delete Message Reply to this message

Thanks for all the feedback to date. I'm going to do a little bit more reading (only a bit mind, I'm a lazy sod) and see if I can work out the correct format for specifying the doctype for this site...




Rob Cook
Joined: Dec 06, 1999
# Posts: 2007

View the profile for Rob Cook Send Rob Cook a private message

Posted: 2006-Jan-03 01:50
Edit Message Delete Message Reply to this message

BTW, is every page supposed to have a doctype specified or just the site's index page?



Rob Cook
Joined: Dec 06, 1999
# Posts: 2007

View the profile for Rob Cook Send Rob Cook a private message

Posted: 2006-Jan-03 01:59
Edit Message Delete Message Reply to this message

Well, I've stuck in the doctype now - I think I've found the correct formatting...

Incidentally, I've just tried to validate the pages at w3.org but didn't get far at all. I got the following error:

"Sorry, I am unable to validate this document because on line 6 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication."

That's kinda weird because line 6 is just a meta tag!



g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10465

View the profile for g1smd Send g1smd a private message

Posted: 2006-Jan-03 02:02
Edit Message Delete Message Reply to this message

Then it has a non valid character in it. Fix that one!


Use this version of the validator for extra options: http://validator.w3.org/detailed.html


The DOCTYPE goes on every page of the site. Make sure too that every page has a "character set" meta tag and that each title tag and each meta description is unique per page.



Rob Cook
Joined: Dec 06, 1999
# Posts: 2007

View the profile for Rob Cook Send Rob Cook a private message

Posted: 2006-Jan-03 02:09
Edit Message Delete Message Reply to this message

Hmmm.... just tried an alternative validator (htmlvalidator.com) and it said zero errors. There are no non-standard characters there...

What's puzzling me - and stopping me from putting the doctype on all pages for now - is that by adding the DOCTYPE to the index page, it appears to have screwed up all the text horizontal alignment from left to centre.

Goddam - wish I hadn't started this :/



g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10465

View the profile for g1smd Send g1smd a private message

Posted: 2006-Jan-03 02:28
Edit Message Delete Message Reply to this message

There IS a non-valid character there.

Stuff like Microsoft Smart Quotes (the ones that curl in, for example) are not allowed, as well as several others that FP spits out.


Your site will be much better off for fixing it all though... once you can validate the code, you'll find the cause of the mis-alignment soon enough.



Rob Cook
Joined: Dec 06, 1999
# Posts: 2007

View the profile for Rob Cook Send Rob Cook a private message

Posted: 2006-Jan-03 03:31
Edit Message Delete Message Reply to this message

I'll confess that I'm lost then. According the the validator, the non-valid character(s) is in line 5 (not 6).

Line 5, as far as I can see, simply is:

<TITLE>UK Casino Times. The Guide For UK Casino Players</TITLE>

There's nothing invalid there as far as I'm concerned. Unless anyone can tell me different?



g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10465

View the profile for g1smd Send g1smd a private message

Posted: 2006-Jan-04 00:36
Edit Message Delete Message Reply to this message

In the W3C validator options, temporarily change the "Chararacter Encoding" settings to "ISO-8859-1" to at least let the validator check the page. This doesn't alter anything on your site, just lets the validator get to work.

I just looked at your index page, and there are several things there that can be tidied in your code. Read all my earlier threads for lots more info. Your HTML code has this 1998 retro feel to it. I kept hearing myself say "I wouldn't do it like that". Lots of things could be improved smile



Rob Cook
Joined: Dec 06, 1999
# Posts: 2007

View the profile for Rob Cook Send Rob Cook a private message

Posted: 2006-Jan-04 02:49
Edit Message Delete Message Reply to this message

"Your HTML code has this 1998 retro feel to it."

So very true smile



seekz
Joined: Jan 11, 2006
# Posts: 19

View the profile for seekz Send seekz a private message

Posted: 2006-Jan-12 20:01
Edit Message Delete Message Reply to this message

I am strongly in favour of Strict XHTML. If you search for the term "quirks mode" then you will see why.

If you are not using XHTML and CSS then don't bother using a DOCTYPE.



g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10465

View the profile for g1smd Send g1smd a private message

Posted: 2006-Jan-12 22:03
Edit Message Delete Message Reply to this message

Have to disagree with that. Every page should have a DOCTYPE.



Curt
Joined: Eons Ago
# Posts: 3747

View the profile for Curt Send Curt a private message

Posted: 2006-Apr-08 12:15
Edit Message Delete Message Reply to this message

Why use doctype if sites show up OK in the browsers and get indexed by the engines?



g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10465

View the profile for g1smd Send g1smd a private message

Posted: 2006-Apr-08 18:48
Edit Message Delete Message Reply to this message

It tells the browser what sort of code to expect.

Lets it get on with its job rightaway instead of having to make a guess.


You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
  1. You have not yet logged in, or registered properly as a member
  2. You are a member, but no longer have posting rights.
  3. This is a private forum, for which you do not have permissions.

If you are a recent member, it's possible that you simply have not yet confirmed your account. Please check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions contained within.

If you cannot find this message, click here to Re-Send it.

If you are still experiencing problem, please read the Login Assistance Article for some advice on what may be causing your login not to work properly.

Switch to Advanced Editor and ... Create a New Topic or Reply to this Thread

New posts Forum is locked
© 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions