|
Posted by Gιrard Talbot on 01/13/06 20:56
Marc a Γ©crit :
> GΓ©rard Talbot wrote:
>> The most important thing is to write with a strict DTD. Strict DTD
>> will bring all modern browsers (they all do support rendering mode
>> based on doctype declaration) into web standards compliant rendering
>> mode. In case of MSIE 6, this is very important to do since MSIE 6 in
>> standards compliant rendering mode will implement correctly the CSS
>> box model.
>
> Does this mean that browsers actually take note of the doctype and
> interpret the markup differently?
Yes, they interpret the HTML a bit differently but its the CSS that they
interpret much more differently.
Here's a list of differences in MSIE 6 and in Mozilla and Opera 8+:
MSIE 6:
CSS enhancements in MSIE 6:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp
Mozilla and Firefox:
Mozilla's Quirks Mode
http://developer.mozilla.org/en/docs/Mozilla's_Quirks_Mode
Mozilla Quirks Mode Behavior
http://developer.mozilla.org/en/docs/Mozilla_Quirks_Mode_Behavior
Opera 7 and 8 doctype switching:
http://www.opera.com/docs/specs/doctype/
When your webpage does not trigger quirks mode but instead trigger
standards compliant rendering mode, then there are just a few
differences and the rendering in modern browsers (browsers after 2001;
IE6, Opera 7+, Mozilla 1.x, Firefox 1.x, Safari 1.2+, etc.) their
rendering is much closer to the specs and more correct.
Sorry if that sounds a really dumb
> question...
>
No it's not; actually not enough people actually know that.
More on this (the table is a bit outdated):
Activating the Right Layout Mode Using the Doctype Declaration
http://hsivonen.iki.fi/doctype/
>> Overall, strict DTD disregards elements and attributes used for
>> presentational/style purposes: your markup code makes better (or more
>> correct) use of the HTML code in its original intent, in its best
>> intended purpose. Usage of elements like <font>, <center>, etc. and
>> attributes like bgcolor, vspace, etc. are formally deprecated and
>> should be replace by use of CSS.
>
> That's okay, we don't use any of the elements or attributes you
> mentioned, and use CSS for presentation as it is intended. There is one
> attribute I have not yet found an alternative to...
>
> <img src="" align="right" />
> <p>Big long paragraph of text</p>
>
> This makes the text wrap around the image, is there a CSS alternative to
> this?
>
Not sure if this is what you want but I think this is what I would use:
<p> <img src="[path]/filename.ext" width="..." height="..." alt=""
style="float: right; padding: 8px;">Big long paragraph of text</p>
>> Reasons why HTML is to be preferred to XHTML are mentionned in 2 well
>> written documents:
>>
>> Sending XHTML as text/html Considered Harmful
>> http://www.hixie.ch/advocacy/xhtml
>>
>> Say NO to XHTML
>> http://www.spartanicus.utvinternet.ie/no-xhtml.htm
>
> Thank you, I shall have a read through these documents when I get some
> time. :-)
>
> Marc
GΓ©rard
--
remove blah to email me
Navigation:
[Reply to this message]
|