ASP Is Fun

Learning ASP
Free Course
Basics
Functions
SQL Commands
Sample Code

Servers / Setup
Host Reviews
Server Setup
Error Tips

Contract ASP
Development

Intro to ASP



 
Italian Wedding


Choosing a Doctype - Transitional vs Strict



Let's start at the beginning. Every HTML page you write really should have a doctype at the top of it. It should look like this -

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

or like this

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

There is a third type for framesets, but will ignore that one, as hopefully nobody is using frames any more :) In essence, these two commands either tell the browser that they are going to get a completely CSS document (the strict) or that they will get a document that has formatting done at least partically without CSS (loose, also known as transitional).

So for example, say that you are using CSS but that you sometimes use commands such as:

CENTER

FONT

TARGET

ALIGN (on images)

These types of commands would NOT be accepted in a "strict" environment. It is critical that you match your doctype to what you are doing. If you really are going 100% CSS and not using any of these commands any more, then go for strict and make sure you validate a large chunk of your pages to make sure you didn't miss anything. Otherwise, use "loose" so that your legacy code will be accepted.


ASP Basic Information and Tips


ASP Main Page | ASP Ebooks | Free ASP Course | Contact Lisa
All content copyright © 2008 Minerva WebWorks LLC. All rights reserved.



Free Newsletter!

Ebooks
Intro to ASP
ASP SQL DB
Members
Shopping


Introduction to ASP

Romance Tips
Irish Romance
Italian Romance
French Romance

ASP Poll
How do you handle 500 errors?
I don't
Page does nothing
Displays error
Emails error