Forum Moderators: open

Message Too Old, No Replies

DocType declaration

         

StefanArens

4:18 pm on Sep 21, 2007 (gmt 0)

10+ Year Member



Hello

I am just began to browse in the german edition of the W3c documents and found a thing in the source code:

[edition-w3.de...]

Theres no docType declaration.

I thoughht it is very important, to set the right doctype for the used html coding? And this editors missed it?

I am asking me two things:
- What happens if declaration is missing?
- And may this be an fault of the W3c german edition, or is it done by any intention? I have also seen many other pages (also from designer), who just didnt give this first line to a document.

p.s. I was browsing with firefox at this page and the small logo on right top [Edition W3C.de] wasnt there, but even with IE 6 it was.

Greetings (form germany)
Stefan

Marshall

7:29 pm on Sep 21, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Stefan,

Welcome to WebmasterWorld and greetings from Western Pennsylvania.

In short, the doctype tells the browser by what standard to render a page. There are a lot of threads on this forum (do a WebmasterWorld search for doctype) which can provide probably more information than you need :) but all useful (besides saving me typing time) A very good thread is Choosing The Right Doctype [webmasterworld.com] which provides a very detailed explanation.

Marshall

Theres no docType declaration.
Almost forgot to address this. Who says those who make the rules have to follow them :)

[edited by: Marshall at 7:30 pm (utc) on Sep. 21, 2007]

Xapti

5:58 pm on Sep 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Back in the old ages of the web world and web design, there was a thing called quirks mode (it was only called that after the fact, I believe) because there wasn't really a standard followed, and browsers had different renditions of elements and styles. There's virtually no reason to still use it, but it's possible some coders/designers don't know about doctype, or just want to stick with quirksmode for whatever reason.

[edited by: Xapti at 5:59 pm (utc) on Sep. 22, 2007]

penders

10:19 am on Sep 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



From the W3C [w3.org]:
The normative version of the HTML 4 specification is in English. If English is not your first language, volunteers are working to provide translations in other languages.

So basically, anyone can volunteer to do a translation. However, the German version does validate to HTML4.01 Transitional (if the appropriate DOCTYPE is selected), the same as the English version.

p.s. I was browsing with firefox at this page and the small logo on right top [Edition W3C.de] wasnt there, but even with IE 6 it was.

The logo you mention appears OK for me in both FF1.5 and IE6. However, the "W3C Recommendation" side banner on the left does not appear in IE6 on the german version and the coloured DIV container at the top (.transheader) appears left aligned beyond a certain minimum width(?!) This may be due to the fact there is no DOCTYPE (so IE is rendering in 'quirksmode') or because of the persistant (and incorrect) use of display:box in the de-only stylesheet?! Or something else...?

Theres no docType declaration.

One possible argument against using a DOCTYPE and allowing modern browsers to render the page in 'quirksmode' might be that old browsers (including IE5 Win) only have 'quirksmode' and so in order to maintain the greatest compatibility across all browsers old and new; don't include a DOCTYPE...? Obviously you can't be too creative with your layout if this is your goal?!

As mentioned above, the DOCTYPE contains information about the document structure but it also influences the layout of the document - and this is what some (purists) might be against. How do you separate your content and layout when the DOCTYPE itself influences the document layout?

However, all other translations of the W3C I've seen do use a DOCTYPE.

StefanArens

8:56 pm on Sep 23, 2007 (gmt 0)

10+ Year Member



Hello

The doctype and its myth. Hehe. Well, i just began to believe in it and use it. I found for myself, thats theres a language (html, css) and a standard, to spell it correctly - and no browser should give the answere to what one is going to do. I dont trust browsers. lol esp. IE (IE seems to makes the font-size bigger than the other browsers always, but i cant manage it so easy like in the other browsers, just to change the font-size in a good manner).

Thank you all

Stefan

[edited by: StefanArens at 9:01 pm (utc) on Sep. 23, 2007]

Xapti

11:32 pm on Sep 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



IE sizes fonts properly as far as I know, but it is different. The issue might be that you have your DPI changed, and/or that your font in other browsers is a lower value. Note that a browser like Firefox uses PIXELS for the base font size, while IE uses POINTS, which changes pixel size depending on the user's set DPI. So if you're running at 120DPI, IE will properly size it's fonts bigger, unless the font is specified in pixels (I think. It might resize it anyways).