Solved

Missing DOCTYPE in my web pages

Posted on 2004-04-20
9
226 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
YouTube Video Converter 9 78
Web Developer 7 274
How do I use iTextSharp to turn my current page into a .pdf? 14 703
Web Modal Window 1 78
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…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to Import and export files in WordPress. 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 : Click on Too…
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…

840 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