Log in

View Full Version : doctype validation making me insane



Carole
03-01-2007, 11:29 PM
Please, is there a doctypes-for-dummies site that I'm missing? I have researched for a month and cannot figure it out, aaaaaaaacccckkkk!!!

I can't validate my pages to save my life!

Alternatively, how can I get my page rewritten in one of the new doctypes? Is there a reasonably priced program that will convert it?
[rant follows]


I am a self-taught hand-coder, apparently from the 'olden days,' circa 1999-Y2K, when you could easily type out a basic webpage and it worked flawlessly with simple little self-explanatory html tags like font color and size, for fun a little scrolling marquee and maybe a few nested backgrounds.

7-8 years later I find myself being sucked into a vortex of confusing "new and improved" document types that are making everything I've learned obsolete and unacceptable.

I tried to find an affordable webpaging program that would let me design a simple page to my liking, but wound up having to hand-code it to make it display properly.

During the process I have apparently mixed my metaphors or overstirred the pot, because I can NOT find out what doctype I need to validate my pages, and when I use the online coverter to "fix it" by converting to XHTML, I lose formatting (for example, items centered in a table).

I am losing my mind. Why isn't there a docs-for-dummies guide that will help me with this? CSS "help" sites are not helpful, they all assume a certain level of knowledge. Everything available is SO over my head, I want to SCREAM.:mad:

mburt
03-02-2007, 12:52 AM
First, try html 4.01 strict:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

If it turns out with errors, it will tell you what is wrong, and on the line (approximately) where it is.

If not choose the appropiate one from this list:
http://www.w3.org/QA/2002/04/valid-dtd-list.html

BLiZZaRD
03-02-2007, 01:18 AM
Don't worry Carole, we have all been there (some more recently than others).

There are even valid arguments for both sides of the validation debate, some oppose it, and with good reasons, and some make it a must have.

I am more on the must have side of the fence, but that too is debateable.

The most important thing to remember is not to give up. If you are self-taught, like me, it makes things a tad harder, but more enjoyable in the end.

First, you really should get a little grasp on CSS. It does seem a daunting task I know, I felt the same way about 6 months ago.

Then I found this CSS howto link (http://www.w3.org/Style/CSS/) And it walks you through a very basic CSS sheet to make a page. It isn't all advanced, but you get the basic ideas and can get a better grasp from there.

(been having problems lately loading that site, so if you need other links let me know.)

Once you have a semi-firm grasp on CSS, then go back to the validation links mburt showed you in the post above.

Personally I would start with HTML transitional, then move to strict, but that again is personal preference.

Good Luck with it, and be sure to post questions here or ask for help about a specific error if you need to :)

Twey
03-02-2007, 01:25 AM
First, try html 4.01 strict:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">That is a badly-formed Transitional DOCTYPE, not Strict. The Strict DOCTYPE (the only one you should be using in this day and age, except for some very special cases), is:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Alternatively, how can I get my page rewritten in one of the new doctypes? Is there a reasonably priced program that will convert it?No. There are no programs that will convert it, because programs have no sense of semantics, which is the driving force behind the whole web standards movement :)
I am a self-taught hand-coder, apparently from the 'olden days,' circa 1999-Y2K, when you could easily type out a basic webpage and it worked flawlessly with simple little self-explanatory html tags like font color and size, for fun a little scrolling marquee and maybe a few nested backgrounds.Same (a couple of years earlier, actually). And boy am I glad we've moved on :p

Carole
03-02-2007, 08:21 AM
well, I do really appreciate your replies and encouragement. I just don't think I'm smart enough to figure it all out in time. I need to work on a whole slew of matching pages and I just can't get it.

I notice that most of the sites offering CSS help are bare bones white pages with plain text, LOL! THat shows me the authors can't really do much with it, they just want you to think so!

AFter many hours of trying to fix my pages, I decided to work on my own fantasy language and hit the sack.
:eek: :rolleyes:

DOC TYPE: Carole's new coding language: BeatOfADifferentDrummer101/Transitional, Flexible, Forgiving, and Understanding! Validation url=inmyownlittleworld.wherever
Comments=CSS made me tear out my hair. And this language works in any browser that has ever existed or will ever be developed! End comments.

Main Page: 2 Divisions
Division 1: Top of Page
Size=150 pixels high
Background color=black
Background image=url/image.jpg
line break
Insert image: url/line.gif width=100%
line break
Menu items: Center All!
Button 1=url/image.gif link=url
Button 2=url/image.gif link=url
Button 3=url/image.gif link=url
Line Break
Insert image: url/image.gif width=100%
line break

Division 2: Bottom of Page
Page Decoration: Type=triple border background.
Bottom layer: Page background color=blueviolet
Background image=url/image.jpg
Left Margin=0 pixels
Top Margin=0 pixels
Right Margin=0 pixels
Bottom Margin=0 pixels
Padding=top 50 pixels all around!

Second layer: Page background color=black
Background image=no
Left Margin=0 pixels
Top Margin=0 pixels
Right Margin=0 pixels
Bottom Margin=0 pixels
Padding=50 pixels all around!
Insert table cells!
Row 1 Cell 1:insert image=url/image.gif
Cell 2:insert image=url/image.gif
Cell 3:insert image=url/image.gif
Row 2 Cell 1:insert image=url/image.gif
Cell 2:insert image=no
Cell 3:insert image=url/image.gif
Row 3 Cell1:insert image=url/image.gif
Cell2:insert image=url/image.gif
Cell3:insert image=url/image.gif
End table cells!

Top layer
Background color=white
Background image=url/image.jpg
Main Page Content Goes Here!
Insert Image, Left aligned, url/image.jpg
Line break
Line break
Font face=Arial size 10 Bold: Dear Visitor,
Line break
Line break
Indent 5
Thanks for checking out my site and please enjoy the lovely photos and information!
Line breaks=5
Indent 10 Insert image=url/image.jpg
Spaces 20 Insert image=url/image.jpg
Line breaks 10
Indent 5
Weren't those lovely photos?
Line breaks 2
Indent 40
Cordially Yours,
Line breaks 5
Indent 40 Signed: KISS!
Line breaks 10
Center Image: url/image.jpg
End Main Content and Center all!

Add additional content outside of main? Yes!
Insert Webring coding here!
Webring membership number 777's easy coding, thanks for joining!

Insert Page Counter here!
Lovely page counter #425, work indefinitely with zero errors? Yes!
Thanks for adding our lovely page counter!

Life is Beautiful and thank you for playing!

P.S. position another image: 50 pixels from right and 25 pixels from bottom. Location=url/crazyeyes.gif

BLiZZaRD
03-02-2007, 02:36 PM
I Love it! I would implement that right away!

But I tried and got 487 errors :(

You are very creative, and intelligent. Believe me you won't get CSS and validity in one day.

Baby steps. One day at a time. Pick something and go for it. Like CSS... learn the basic structure, make a page with a couple different colored boxes on it or something.

Then go on from there. You can do it! (believe me, if I can ANYONE can)

Carole
04-16-2007, 03:19 AM
Thanks so much for the encouragment. It's been awhile since I visited.
I had to put away the problems for awhile.:o

For now I guess I'll just continue with my error filled pages and worry about it later.
I have too many hours of work in my regular job and this is a hobby, but I was letting it interfere with sleep!

I would love to send you the URL for anytime you are bored and wouldn't mind peeking at my source, but I fear posting it because I can't afford the bandwidth if too many people visit. :eek: :D

JShor
04-16-2007, 05:54 AM
At this point, I don't even include it in my HTML, I don;t care enough to. I hate those as well. Don't worry about it, it really doesn't help except for your page working in certain distinct browsers.

Twey
04-16-2007, 06:48 AM
At this point, I don't even include it in my HTML, I don;t care enough to. I hate those as well. Don't worry about it, it really doesn't help except for your page working in certain distinct browsers.If it doesn't validate, it's not conforming to your chosen DTD, which means it's not even HTML, just a mass of text. If you're lucky, you'll have written it in such a way that most browsers will get what you mean and error-correct it into real HTML. Of course, they'll all do it slightly differently, and there are no standards for doing so, so you've no idea what your page will look like in the end, and people relying on this are why most modern browsers are twice the size they need to be, but hey.

Roll on XHTML :)

mburt
04-16-2007, 07:47 PM
Personally, I find DTD problems easy to fix with the validator (http://validator.w3.org). Maybe it's just me.

Carole
04-19-2007, 05:12 AM
Well Mike, maybe it's just you and maybe it isn't. But it certainly isn't me.
I find no help at the validator, only criticism.

"HA HA HA, YOU HAVE 137 ERRORS and an invalid doctype, neener neener neener!!!"

It does not explain how to fix the errors, or help one choose a more suitable doctype.
I tried to teach myself how to do my self-resizing triple border layout with CSS but it was impossible for me, and I have tried lots of doctypes and all are invalid.

I don't care anymore. The pages display well in IE, older Netscape, current Firefox, so...so what?!

boxxertrumps
04-19-2007, 01:59 PM
Ok, carole, are you using xhtml1, 1.1 or html4.01?

If html4.01, use this doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

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

If xhtml1.1:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

Now, read up on the chosen doctype and conform to the rules that the dtd imposes.

Also, it would help if you could show us the pages you have so far, so we can help by pointing out your mistakes and offering solutions.

mburt
04-19-2007, 06:42 PM
I don't care anymore.
You are entitled to your opinion.
And yes, if your page works, it works. But it's still not compliant.

techno_race
04-20-2007, 12:54 AM
I think Amaya could do the doctype, convert the page between doctypes and do about anything else with doctypes:
http://www.w3.org/amaya/

deficit
04-23-2007, 01:19 AM
If it doesn't validate, it's not conforming to your chosen DTD, which means it's not even HTML, just a mass of text. If you're lucky, you'll have written it in such a way that most browsers will get what you mean and error-correct it into real HTML. Of course, they'll all do it slightly differently, and there are no standards for doing so, so you've no idea what your page will look like in the end, and people relying on this are why most modern browsers are twice the size they need to be, but hey.

Some browsers *cough*IE*cough* don't conform to standards anyways, and your webpages will STILL look different across different browsers, whether it passes validation or not. But I agree, it is always best practice to specify a doctype on all the pages of your site, and make sure it all passes validation. It would be nice if the validator also checked for semantic markup, as that's very important as well.

Carole, if you're still interested in learning how to make standards-based and cross-browser websites, I recommend the book "Bulletproof Web Design" by Dan Cederholm.

Anyone ever do the Acid2 browser test? It's a test to see if your browser conforms to W3C standards, and the results are alarming, to say the least. http://www.webstandards.org/action/acid2/

PS - Opera is the only browser that can pass this, and IE does the worst (surprised?). Firefox does way better than IE, but doesn't quite meet the standard... still way better than IE though.

boxxertrumps
04-23-2007, 03:38 AM
konqueror passes the test.

the nose goes blue when you hover over it.

Twey
04-23-2007, 05:05 PM
Firefox does way better than IE, but doesn't quite meet the standard... still way better than IE though.Firefox 3 does better, it passed in one of the nightlies but they changed something and now it doesn't again (there's one extra red block in the page, not sure exactly which rule it fails). I expect it will by release.
It would be nice if the validator also checked for semantic markup, as that's very important as well. It would be nice. Unfortunately it's also impossible by definition :)

boogyman
04-23-2007, 05:38 PM
Carole, if you're still interested in learning how to make standards-based and cross-browser websites, I recommend the book "Bulletproof Web Design" by Dan Cederholm.


Couldn't not have said it any better :) Very Very Good Book. was the second book I bought on css. the first being Dan's other title :).

ps. he runs lil bits of info from his site simplebits.com (http://www.simplebits.com)

mburt
04-23-2007, 07:07 PM
Firefox 3 does better, it passed in one of the nightlies but they changed something and now it doesn't again (there's one extra red block in the page, not sure exactly which rule it fails). I expect it will by release.
Just so 'ya know... I recently got a friend to download Ubuntu, and on the LiveCD, there was the programs, GIMP, Firefox, Thunderbird, etc. I looked at FireFox and it said version 3.
I tried to install it, but unfortunately didn't work.
In fact, I'll close FireFox now and try again (I was running alot of tasks at the time, and I think I accidently closed the installation windows)

riptide
04-23-2007, 07:46 PM
css in firefox and IE weren't a problem for me. firefox to me is almost just as bad as IE.

I just don't get it. most of the books out there are way above 1999 and even some books from 2001 tell of XHTML. :rolleyes:

anyway CSS is way better than using tables. why did you go to this forum before trying to read any books on the subject.

boogyman
04-23-2007, 07:56 PM
I tried to teach myself how to do my self-resizing triple border layout with CSS but it was impossible for me, and I have tried lots of doctypes and all are invalid.

impossible? or you just gave up because of frustration?

Twey
04-23-2007, 08:19 PM
I just don't get it. most of the books out there are way above 1999 and even some books from 2001 tell of XHTML.XHTML 1.0 was released only a few months after HTML 4.01. IE still doesn't support it, though.

riptide
04-25-2007, 08:46 PM
what do you mean IE dosent, I'm using IE and using XHTML

Twey
04-25-2007, 08:56 PM
No you're not, unless you have a plugin of some kind. Probably, you're sending the markup as text/html, which causes IE to error-correct it into HTML. That's not XHTML, though, it's invalid HTML.

boxxertrumps
04-25-2007, 09:41 PM
I've tried messing around with it being fully XML, but am having trouble with the style sheets...
background-color doesn't work for some reason.

EDIT: i mean, its sort of important to me for my end users to not have to have error correction, i want to have my website available for PDAs, psps etc and not be that intensive on the hardware as it attempts to render it.

The recommendation has been around for quite a while now (8 years), you'd think there would be more support for it.