Solved

Missing DOCTYPE in my web pages

Posted on 2004-04-20
9
219 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
 
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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 insert an Iframe into 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 : Open Page or Post…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now