L. David Baron wrote:
On Saturday 2007-02-24 19:57 +0100, Tony Mechelynck wrote:
[EMAIL PROTECTED] wrote:
I'm curious to know how the rendering engine determines the default
display "type" for elements such as div or p or whatever. or, a div
renders as a block element by default, why does it do that?
is it within the render engine itself, or a default stylesheet
somewhere?
or, does anyone have some links that contain information on this?
thank you much!
It's all part of the definition of HTML.
No, it's not. HTML doesn't define its presentation, and CSS only
contains an appendix that's an example of how one might present HTML
(with a bunch of mistakes in it).
? Well, I won't contradict you, but if not the HTML guidelines, which are the
regulations which say that DIV (etc.) is block and SPAN (etc.) is inline then?
The HTML DTD does have entities called %block and %inline, but those
refer to what elements are allowed to contain other elements, not to
the display type.
Now about how it's coded in Gecko: I think it gets it from the appropriate
DTD (which varies according to the HTML version each page uses), or from
some default DTD if there is no <!DOCTYPE at the start of the document, but
that's only a guess on my part.
Gecko doesn't parse DTDs for HTML, nor do any other frequently used
Web browsers.
That said, this is a list for Mozilla developers. Given your level
of experience in Mozilla development, you're probably better off
here doing relatively more reading and less posting. Otherwise
Mozilla developers who participate in this list will spend all their
time correcting misinformation and be unable to find the real
Mozilla development discussions on the list, which will cause the
Mozilla project to become less open because there aren't any
usable public discussion forums for developers.
-David
OK.
Best regards,
Tony.
--
"On two occasions I have been asked [by members of Parliament!], `Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able rightly to apprehend the kind of
confusion of ideas that could provoke such a question."
-- Charles Babbage
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout