Solved

Missing DOCTYPE in my web pages

Posted on 2004-04-20
9
221 Views
Last Modified: 2013-12-24
I recently tried to validate one of my web pages and received a "Fatal Error!" response that said there was no Doctype listed on the page.  I use Frontpage 2000 (version 4.0.2) for publishing.  I've investigated Doctypes and see that there are many different kinds out there on the web!  How do I know which one I should put into my pages?  
0
Comment
Question by:vicicicic
  • 4
  • 3
  • 2
9 Comments
 
LVL 29

Accepted Solution

by:
coreybryant earned 200 total points
ID: 10869193
What kind of website do you have?  If it is pretty basic - add:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
to the top line of your code.  

You can read more about them here:  http://htmlhelp.com/tools/validator/doctype.html

-Corey
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 10869565
Just to add, without confusing the issue:
http://www.positioniseverything.net/articles/doctypes.html

Basically the doctype is a way of telling the broswer how to render your pages - incorporating older deprecated code, or using only the newest standards...

Unfortunately FP2000 doesn't have a method for automatically inserting the code :-(
0
 

Author Comment

by:vicicicic
ID: 10870503
I use a lot of nested tables, some java scripts and applets, rollover effects, and a couple of my sites have a form or two.  I use Frontpage themes which I modify.  I do not use Flash files, nothing that would get complicated!  I have read the articles on both of your links, and have a better understanding.  Do you still think the choice of the HTML 4.01 Transitional is right for me?
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 29

Expert Comment

by:coreybryant
ID: 10870550
I would say yes.  I have used that before with the nested tables..  Not too many problems..  You will find some issues with nested tables.  The applets - I would say do not use because of the java.

-Corey
0
 

Author Comment

by:vicicicic
ID: 10870610
Will this DOCTYPE interfere with my java applets, or my java scripts?  Do I really NEED a doctype specified?  My pages have been doing fine and I have not had a DOCTYPE in the code!
0
 
LVL 31

Assisted Solution

by:seanpowell
seanpowell earned 100 total points
ID: 10870633
No - you don't "need" a doctype, unless you're concerned with validating your code.

Using a doctype and validating forces you to make sure that your code is written according to the standards, and helps ensure that your pages render "basically" the same cross-browser....
0
 

Author Comment

by:vicicicic
ID: 10870840
OK!  Thanks, Sean!  My mind is set to ease, knowing I don't NEED a doctype.  That Fatal Error response from the validator had me worried!  (Takes me back to the old Win 95 days...)  I will try Corey's suggestion of that Transitional HTML code, and  see what happens, I can always take it back out!  I appreciate both of your quick responses.  I will split the points between you.  Thanks.
---Vic
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 10870884
Just one last thing if it's okay...

This:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

should ideally be this:

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

The difference is that the first one will leave the browser in quirks mode, the second will generate strict mode - meaning your pages will display more consistently. It's not that one is wrong or right though - either is fine depending on your layout. Just pointing it out :-)
0
 

Author Comment

by:vicicicic
ID: 10871135
Thanks, Sean, I'll add it in...   :)
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bootstrap align photos when printing 10 80
About Wordpress website 3 107
Advanced Visual HTML Editor 2 89
Web Development Tools for MVC 3 92
Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question