doctype help

J

João

Hi everyone,
I've created a page with Microsoft Frontpage. Now I want to validate it
using the w3c validator, but the first error I get is a missing doctype
declaration. So I went to the help page of them and found a bunch of valid
declarations. However, I've tried several, and the result for my page was
always: "validation failed for...".
The page I'm trying to validate is:
http://viagensdojoao.googlepages.com/brasil_2000.htm
Everytime I atempt to validate it with a different doctype i get another
error: invalide declaration, invalid close tag, etc..., so I need to know
which one should I use. Any help?
Thanks
 
J

Jon Spivey

Hi,
Using a doctype doesn't make your page valid in itself. Your HTML needs to
validate against the doctype you chose. I'd use transitional as it's the
easiest to start with. Stick this at the top of your page

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

Then your page will have these 8 errors
http://validator.w3.org/check?uri=h...doctype=HTML+4.01+Transitional&ss=1&verbose=1

Work through and fix them one by one - they're all simple.
 
J

João

Thanks man, I just needed to know what doctype should I used. I managed to
solve all the errors, including that one of the alt attribute missing (which
FrontPage should place by default). The fact of just add the doctype info
dislocated my logo to the right, but I managed to place it almost in the
place it was. I'll try to put it on the right place, which is somewhere above
the current position...
Another thing that I couldn't fix was that leftmargin="40", which I had to
delete, and now my page is nearer the left border. The google search aren't
helping me, I just wanted to center the entire page and can' find teh
command...
Anyways: http://viagensdojoao.googlepages.com/brasil_2000.htm
is now modified to meet the html requirements at:
http://viagensdojoao.googlepages.com/teste.htm
I'll now have to teste this new version and to apply those changes to all
the others pages...
Thanks for the reply
João

PS: if you could help me and tell how to replace the leftmargin and center
the page I would appreciate. I know this is not an html help section, and
that the question was already answered...

"Jon Spivey" escreveu:
 
M

Murray

The fact of just add the doctype info
dislocated my logo to the right, but I managed to place it almost in the
place it was.

This shows that the method you had used to place your logo was not a
standards compliant method. Adding the doctype will change the browser's
rendering method from "quirks" to "standards", and all quirky renderings
will be eliminated.
Another thing that I couldn't fix was that leftmargin="40", which I had to
delete, and now my page is nearer the left border.

Use CSS for that -

body { margin-left:40px; }
 
J

João

Thanks, I have been reading the guides on the w3 page, and found out that now
the CSS is now much more used that the tradicional methods... In fact, having
a css file with the style of the pages is very usefull, I'm start reading
about that subject, so that I can replace my site with CSS style...
Thank you very much for your help, both to Jon and Murray.
;)
João


"Murray" escreveu:
 
J

jpcummins

I wonder why if a website is creating in FrontPage a doctype is not created
by FrontPage. I am beginning to believe that Dreamweaver is the way to go.
 
J

jpcummins

Kathleen, I know only enough about FrontPage to get myself in trouble. Yes,
I am a dummy. If you would kindly look at my site, http://www.jpcummins.com,
and suggest what Doctype I should use I would appreciate it greatly. I have
tried a number of Doctypes but each one I try shows as incorrect in W3C
Markup Validation Service. The first time I tried to validate the site the
report indicated 18 errors. I cleaned it up using HTTP Tidy then revalidated
and the report listed 3 errors. I am hoping that by having the correct
Doctype that it my clear up the other errors. Any assistance and cooperation
you may give me will be greatly appreciated. Thanking you in advance.
--
john


Kathleen Anderson said:
You can add it to the template:
http://www.spiderwebwoman.com/tutorials/doctypesolution.asp or use a Code
Snippet: http://mvp.wiserways.com/tutorials/codesnippets/index.html


--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
Expression Web Resources: http://www.spiderwebwoman.com/xweb/
FrontPage Resources: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others
 
M

Murray

By using frames you will have continual problems with your site, I'm sorry
to tell you.

The reason for using or not using frames should be based on a) your site's
needs, and b) your willingness to accept the potential problems that frames
can create for you as developer and maintainer of the site and for your
visitors as casual users of the site.

I am down on frames because I believe that they create many more problems
than they solve.
Judging from the posts here, and the kinds of problems that are described,
the kind of person most likely to elect to use frames is also the kind of
person most likely ill-prepared to solve the ensuing problems when they
arise. If you feel a) that you understand the problems, and b) that you are
prepared to handle them when they occur, and c) that you have a need to use
frames, then by all means use them.

As far as I know, the most comprehensive discussions of frames and their
potential problems can be found on these two links -

http://apptools.com/rants/framesevil.php
http://www.tjkdesign.com/articles/frames/
 
J

jpcummins

Thank you for your reply to my post. I had no idea of the difficulties of
using frames when I designed my site. What I know about FrontPage I have
picked up as I have went along. I have not taken any classes on FrontPage
but I am considering taking a class on Dreamweaver. I never considered
taking a class on FrontPage because it seemed so very easy to learn for
beginners. You have given me a lot to think about. Again, thanks for your
reply.
 
J

jpcummins

Kathleen thank you for answering my post. I believe this doctype is one I
have already tried but I plan on trying it again tomorow. Again, thank you
very much for answering my post.
 
M

Murray

I would not focus so much on the tools. Take your classes in HTML and CSS.
If you are comfortable with them, the system you use to create your pages
will be nearly irrelevant.

Good luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top