Welcome to WebmasterWorld Guest from 54.167.83.224

Forum Moderators: incrediBILL

Message Too Old, No Replies

What is this full doctype

learned HTML in 96 - did this come since then?

     
9:25 pm on Mar 2, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member annej is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 17, 2002
posts:3318
votes: 0


I find I can't validate my pages because I don't have a doctype. What is it anyway? Why do I need it? I've been building web pages for 10 years and they seem to work fine.
9:54 pm on Mar 2, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


Here's the basics from the W3C:

Don't forget to add a doctype - add what? [w3.org]
List of Valid Doctypes [w3.org]

12:09 am on Mar 3, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member annej is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 17, 2002
posts:3318
votes: 0


"add what?" says it all.

This pretty much describes me, "the browser assumes you’ve written old-fashioned, invalid markup and code per the depressing industry norms of the late 1990s."

That's me. I learned HTML the old fashioned way, by looking at other people's source code. I can't begin to imagine which kind of HTML it is. I try it and if it works I use it.

Would this be the code for me?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

1:03 am on Mar 3, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 2, 2004
posts:551
votes: 0


Best for you? That all depends. Transitional 4.01 is ok if you just code HTML but I like XHTML strict because it is bulletproof across browsers (which decreases your QA time) and I am a pixel nazi.
3:31 am on Mar 3, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member annej is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 17, 2002
posts:3318
votes: 0


All I do is hand coded html and css.
6:21 am on Mar 3, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


I would say: start with HTML 4.01 Transitional. Get that to work and validate. Then move on to HTML 4.01 Strict.

You will be amazed at the structural things you will learn about HTML simply by fixing minor validation errors. :)

I hand code everything as well and have used a doctype in my documents for 6 years now. Using a doctype (and validation) has made me more aware of what I'm actually doing. In the end I have become a better coder.

9:49 am on Mar 3, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 26, 2004
posts:1497
votes: 0


I'd agree with DrDoc - definitely move to Strict eventually. That's what transitional's for: an intermediate step to make the path to strict less painful.
10:50 am on Mar 3, 2006 (gmt 0)

New User

5+ Year Member

joined:Feb 28, 2006
posts:20
votes: 0


The attitude of "if it works, I use it and if it comes out on screen alright I don't care about anything else" really doesn't work with the web...
1:43 pm on Mar 3, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 11, 2005
posts:386
votes: 0


The attitude of "if it works, I use it and if it comes out on screen alright I don't care about anything else" really doesn't work with the web...

Actually, the problem is that it DOES work. If omitting </html> caused your entire document to fail in all browsers, then we wouldn't have a hodgepodge of would-be web designers spewing out code riddled with errors; we'd have people who know how to write code, and people who don't.

And as always, let's all keep in mind that we're members of a web design forum, and so we're in the minority (ironically) of people who put stuff on the web. Most people- even if they knew the consequences- would rather just have it not work on a Mac, or in Opera, or sans-Javascript, than be bothered to learn how to do it right... and they can't be blamed for not wanting to hire a web designer or buy a book on standards, because at the root, the web is (and should be) a place for everyone to exchange information and ideas- not another cha-ching industry where you're expected to "pay to play" if you want to post any content online.

annej, I think you'll find that you're probably not too far off from where you need to be in creating correct markup. Surf around for info on standards, doctype, etc, and i'm sure you'll be on top of your game in no time.

7:35 pm on Mar 25, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member annej is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 17, 2002
posts:3318
votes: 0


I see Doc types without the "http://www.w3.org/TR/html4/loose.dtd"> at the end. Is it necessary?
8:23 pm on Mar 25, 2006 (gmt 0)

New User

10+ Year Member

joined:Oct 27, 2005
posts:17
votes: 0


Doctype without url is same as no doctype at all.

For details check out
Activating the Right Layout Mode Using the Doctype Declaration
[hsivonen.iki.fi...]

[edited by: encyclo at 9:39 pm (utc) on Mar. 25, 2006]
[edit reason] fixed link [/edit]

6:21 pm on Mar 27, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


^ ^ edited: simul-post :-)

I see Doc types without the "http://www.w3.org/TR/html4/loose.dtd"> at the end. Is it necessary?

If you don't include the URL in the doctype, it throws IE into "quirks mode" which is in many cases the same effect as having no doctype at all. While this works in your favor in most cases by "forgiving" coding errors, it can also work against you by not suporting somethnig specific to your selected doctype.

Don't feel so bad about being an oldschool handcoder (me too.) Taking the steps to get up to speed is better than most do.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members