Click to See Complete Forum and Search --> : a question about doctype


mobiusclimber
10-15-2006, 04:15 PM
i've looked and looked and can't find any information on the doctype ... um... thing? wow i'm dumber than i thought. anyway, what i mean is the bit at the very beginning of html docs that starts off: <!doctype html blah blah blah. what is this, how can i find out what to put for my own page, etc etc etc. any information on this would be very helpful.

Charles
10-15-2006, 04:34 PM
Some other, good people will, no doubt, post some good introductions to the subject. After you have read those read http://www.w3.org/TR/html401/intro/sgmltut.html .

_Aerospace_Eng_
10-15-2006, 04:39 PM
http://alistapart.com/stories/doctype/
http://www.htmlhelp.com/tools/validator/doctype.html
http://www.w3schools.com/tags/tag_doctype.asp

mobiusclimber
10-15-2006, 04:48 PM
alright, thanks for the info guys. i'm still a lil bit unsure of which one i should be using, but at least now i know what they are and what they do. ^-^

_Aerospace_Eng_
10-15-2006, 04:56 PM
If you are unsure then post your code. We aren't psychic. We can probably tell you what you need a lot quicker than you can find out the right one.

felgall
10-15-2006, 05:00 PM
You just need to decide whether you are going to use HTML or XHTML (if you don't uderstand the difference between these then go with HTML).

If you decide to use HTML then use the HTML 4.01 strict doctype.

If you decide to use XHTML then use the XHTML 1.0 strict doctype.

The transitional and earlier version doctypes are for use on existing web pages that use outdated HTML markup that the page author has not yet had time to rewrite to comply with the current standards. Those doctypes should not be used for new web pages.

mobiusclimber
10-15-2006, 05:19 PM
thanks, i get it now. i'm thinking i should either post my code and have you guys take a look and tell me how many different things i'm doing wrong, or keep working at it. i used to code my pages by hand using regular html, no css. for years i haven't had a webpage or done much coding at all. now i'm trying to learn css, and not getting the hang of it at all. i've been using the htmlgoodies topics to show me how to use css, but for some reason, i can't get any of it to work. *shrugs*

mobiusclimber
10-15-2006, 05:32 PM
... what the hell, you guys prolly need a good laugh anyway:

my site (http://www.freewebs.com/mobiusclimber/index.html)

and the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>William Rice's Resume</title>
<STYLE TYPE="text/css">
<!--
BODY {color: yellow}
H1 {font-size: 16px; font-family: garamond; color: #333333;}
H2 {font-size: 12px; font-family: arial; color: #666666; font-weight: 200}
H3 {font-size: 14px; font-family: algerian; color: #cc0033}
-->
</head>
<body>
<H1>yeah yeah whatever.</H1><br>
<H2>and something else.</H2><br>
<H3>and more crap.</H3><br>
</body>
</html>

drhowarddrfine
10-15-2006, 05:47 PM
You arent using frames so dont use the frameset doctype. Use strict as felgall said above. All new pages should use a strict doctype. Other than that, it doesnt matter what your code is.

mobiusclimber
10-15-2006, 05:51 PM
ok i changed it to this one: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

but still the page isn't working so it must not be the doctype that's screwing it up?

drhowarddrfine
10-15-2006, 06:38 PM
Doctypes don't screw up anything. Doctypes declare the set of 'rules' you are following for your page.

You are missing the end tag for <style>.
Also, do yourself a favor and keep your tags in lower case. HTML doesn't care but CSS and Xhtml does.

mobiusclimber
10-15-2006, 06:45 PM
omg! >.< well i knew i was bad at this but i had no idea i was that bad. thanks for pointing out what should have been obvious to me. and thanks for the advice about writing in lower case.