View Full Version : Correct W3C heading HTML with Javascript, please?
bmnobbs
02-13-2008, 07:32 AM
Hi.
I'm an inexperienced self-taught website developer, who usually needs things spelt out in the plainest way possible.
I have most of my pages in simple HTML.
I know that the proper code is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> for an HTML page that occasionally changes.
What is the correct DOCTYPE page code for the same HTML pages if I add bits of Javascript ?
( eg Affiliate Javascript banners/links )
Thanks.
sands
02-13-2008, 08:15 AM
The exact DOCTYPE Declaration is as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
You need not change this for adding scripts.
PixelPusher
02-13-2008, 08:27 AM
As sands mentioned before you don't have to add another Doctype if you use Javascript (or PHP, VBScript, CSS etc.). The Doctype is only relevant for the used HTML respectively XHTML Code you use.
bmnobbs
02-13-2008, 09:14 AM
Thanks
ran_dizolph
02-13-2008, 04:49 PM
As you gain experience, you're likely going to want to step up into strict DOCTYPES (http://www.alistapart.com/articles/doctype/).
It'll give you a little more control over how your page is displayed once you get a handle on things.
Orion
02-13-2008, 04:54 PM
you should also be using xhtml not html 4.01 xhtml came out over 8 years ago now.. html 4.01 was released in 1998.. it's very out dated.
bmnobbs
02-13-2008, 06:55 PM
Thanks, wish I had the time to spare to go back to school.
Never learned the difference in xhtml and html, as I started out in design using Dreamweaver 4, and I only learned what html I know from looking at and examining the code of what I'd designed. As I said, I'm a completely self-taught amateur.
My starting out priorities were 1]quality generic domain grab 2] basic design 3]Google 4]Yahoo 5]Google 6]Google 7]Google.
Up to 12 months ago the strategy was working exceptionally well. - I'd achieved #1 in Google for each Generic domain's title term. Then my full-time job took over priority for 6 months and with little or no attention most sites have almost disappeared from the search results.