473,480 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

which document type

After changing some "old" web pages into CSS I noticed big differences
between mozilla and IE rendering. I finally noticed that the document type
was HTML 3.2.
I copied a more recent tag from another page which had 4.01 transitional.
The Mozilla and IE were then the same , although percentages seem to be less
than the figure given.
I see on web pages about CSS2 " document type HTML 4.0 transitional" or
sometimes HTML 4.01.
What shopuld the document type be. And what differences come about from
changing it.?
cpmac
Jul 20 '05 #1
2 2102
"Colin McGarry" <WE**********@cpmac.com> wrote:
What shopuld the document type be.
If you are authoring new documents according to HTML and CSS
specifications, use HTML 4.01 Strict doctype (irrespectively what the
actual document type is - nobody cares, except validators, and you can
use "doctype override" if needed).

You might wish to occasionally check the effect of removing the doctype,
since this (roughly) shows how IE 5.x (which is still used by many)
displays the page. If it looks ugly, don't care. If it is unreadable, you
might consider doing something about it, probably simplifying your CSS
usage.
And what differences come about from changing it.?


They won't tell us. It has even been proclaimed that the effects of
doctype sniffing must remain undocumented.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #2
Colin McGarry wrote:
What shopuld the document type be. And what differences come about from
changing it.?


Brief guide to important HTML versions.

3.2 - attempt to describe the state of browser support some years ago.
4.01 - attempt to get HTML in to reasonable shape. There are three varients:
4.01 Frameset - for <frameset> documents (which should be avoided under
most circumstances)
4.01 Transitional - The version with most of the old presentational markup
4.01 Strict - The version without most of the old the OPM
XHTML 1.0 - exactly the same as HTML 4.01 but expressed using XML instead of
SGML.

HTML 4.01 Strict probably the best choice for new documents at present.

List of DTDs: http://www.w3.org/QA/2002/04/valid-dtd-list.html

The Doctype shouldn't have any influence over the rendering of pages, but
some browsers use it to guess how smart the author is. "This page has THIS
Doctype therefore the author knows about standards" Vs "This page has THAT
or NO Doctype there therefore I will emulate old buggy browsers".

http://gutfeldt.ch/matthias/articles/doctypeswitch.html

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1664
by: Edward | last post by:
The below code builds 2 tables 4 rows by 4 cols. All cells have checkboxes. When checked, the checkboxes in the first column automatically check the remainder of the check boxes in the same row. ...
15
3285
by: lawrence | last post by:
Is this the correct way to test for a method before I use it? createRange() is, I believe, an IE only method. function wrapSelectionInTag(selection, tag) { if (document.selection.createRange)...
7
3567
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
1
13267
by: prasaddevivara | last post by:
I am using the outerHTML property to modify the HTML of existin elements in a web page in Internet Explorer. But same outerHTM property is not working in firefox browser, Anybody can tell me a...
4
9668
by: mflll | last post by:
I am looking into the different techniques of handling arrays of edit boxes in Java Script. The first program below works fine. However, are there better ways of doing this, where the person...
6
9938
by: anirban.anirbanju | last post by:
hi there, i've some serious problem to add rows dynamically in a table. my table contains 5 cell. | check | from_value | to_value | color_text | color_value |...
1
2705
by: Bill_W_Stephens | last post by:
I have a complicated page with several submit buttons. I don't want to create multiple forms because much of the input is shared and the code is getting very ugly. However I would like to determine...
1
2227
by: Bill_W_Stephens | last post by:
I need a form with two buttons and ability to detect which button was pressed. I got this code to work using a javascript global variable, but I know there must be a better way using DOM. Any...
4
2268
by: Thomas Eichner | last post by:
Hi, does anybody know a public website which offers a service that displays all data send by a browser (or an app calling the website), especially HTTP GET and POST data, browser data etc.? I...
1
1366
by: vinya | last post by:
<html> <head> <script type="text/javascript"> var element; function test(){ abc = document.getElementById('promptbox').value; document.forms.elements.value = abc; ...
0
6918
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7102
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5357
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4798
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4495
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3000
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1310
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
199
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.