Recently, several HTML layout languages have been proposed. This document discusses them and tries to evaluate their performance.
The mechanisms are:
![]() | Cartoon: background image with overlaid text where the positioning of text is important. |
![]() | Brochure: image and text elements are placed relative to each other, i.e., if the first text element grows vertically, the image position will be lowered accordingly. There is no text flow from one frame to another. |
![]() | Windows: current window systems split the screen into scrollable windows. Unlike the window systems, the panes in this scenario cannot be overlapping. This scenario only works on a dynamic computer display. |
![]() | Academia: an academic article often has footnotes and "balanced" double columns. The size of the footnote area will influence the other content. |
![]() | Newspaper: multiple articles from multiple sources are combined in a multi-column design. |
![]() | Magazine: a multi-column page with "insets" where text flows around on both sides. |
compatibility | reusability | scalability | fidelity | readability | |
---|---|---|---|---|---|
HTML tables | initially poor | poor | good | good | poor |
Netscape frames | fair | poor | possible | debated | fair |
Microsoft 2D | fair | poor | possible | unclear | fair |
CSS classic | good | fair | possible | unclear | good? |
CSS cherry | good | good | good | unclear | good?? |
Java applets | poor | unclear | good | unclear | none/poor |
In the table below, "not feasible" means that an important feature for realizing a certain scenario is missing. E.g., without support for text flows, multi-column layouts are static and hard to achieve.
cartoon | brochure | windows | academia | newspaper | magazine | |
---|---|---|---|---|---|---|
HTML tables | no | yes | no | not feasible | not feasible | not feasible |
Netscape frames | no | not feasible | yes | no | no | no |
Microsoft 2D | yes | not feasible | yes | not feasible | not feasible | not feasible |
CSS classic | yes | not feasible | yes | yes | yes | yes |
CSS cherry | yes | not feasible | yes | yes | yes | yes |
Java applets | yes | yes | yes | yes | yes | yes |
<TABLE> <TR><TD>A brochure with.. <TR><TD><TD><IMG SRC-"fish.png"> <TR><TD>Note that there is... </TABLE>
<FRAMESET ROWS="50%,50%"> <FRAMESET COLS="60%,40%"> <FRAME SRC=foo.html> <FRAME SRC=foo.html> </FRAMESET> <FRAME SRC=foo.html> </FRAMEMESET>
<FRAME LAYOUT=FIXED STYLE="width: 100; height: 100; background: bg.png"> <FRAME STYLE="x: 10; y: 10; width: 80; height: 20"> <P>But the evil creature spare none.. </FRAME> </FRAME>
<FRAME STYLE="width: 100%; height: 100%> <FRAME STYLE="x:0%; y:0%; width:60%; height:50%"> Lorem ipsum.. </FRAME> <FRAME STYLE="x:60%; y:0%; width:40%; height:50%"> .. adpiscing elit .. </FRAME> <FRAME STYLE="x:0%; y:50%; width:60%; height:50%"> .. adpiscing elit .. </FRAME> </FRAME>
<STYLE> @frame cartoon { geometry: 0px 0px 100px 80px 2; /* x y width height z-order */ background: bg.png; } @frame text1 { geometry: 10px 10px 80px 20px 1; } @frame text2 { geometry: 80px 80px 20px 20px 0; } </STYLE> <P STYLE="flow: text1">But the evil creature spared none <P STYLE="flow: text2">yow!
<STYLE> @frame frame1 { geometry: 0% 0% 60% 50% 0; /* x y width height z-order */ } @frame frame2 { geometry: 60% 0% 40% 50% 0; } @frame frame3 { geometry: 0% 50% 100% 50% 0; } </STYLE> <P STYLE="flow=frame1"> Lorem ipsum.. <P STYLE="flow=frame2"> .. adpiscing elit .. <P STYLE="flow=frame3"> .. adpiscing elit ..
<STYLE> @frame academia { geometry: 0% 0% 100% 100% 0; /* x y width height z-order */ } H1, P { flow: academia } P { column-width: 30em } P.footnote { float: bottom } </STYLE> <H1>A new theory</H1> <P>Lorem ipsum.. <P CLASS=footnote>Footnote: Lorem ipsum dolor sit..
<STYLE> @frame banner { geometry: 0% 0% 100% 100% 0; /* x y width height z-order */ } @frame article1 { geometry: 0% 20% 75% 80% 0 } @frame article2 { geometry: 0% 25% 25% 75% 0 background: gray; } P { flow: from-predecessor column-width: 30em } P.initial { column-width: max } </STYLE> <H1 STYLE="flow=banner">MY PAPER</H1> <H1 STYLE="flow=article1>Lorum Ipsum</H1> <P CLASS=initial>Lorum Ipsum dolor.. <P>.. <P>.. <H2 STYLE="flow=article2>Yow</H2> <P>Lorum ipsum..
<STYLE> @frame column1 { geometry: 0% 0% 50% 100% 1; /* x y width height z-order */ flow: main; } @frame column2 { geometry: 0% 50% 100% 100% 1; /* x y width height z-order */ flow: main; } @frame image1 { geometry: 50% 50% 200px 200px 0 displace; /* proportional placement */ } <P STYLE=float: main">Lorum Ipsum dolor.. <P>.. <P>.. <IMG SRC=fish.png STYLE="float: image1">
<STYLE> @frame cartoon { x:0px; y:0px; z-order:2; width:100px; height:80px; background: bg.png; layout-policy: bulletin-board; } @frame text1 { x:10px; y:10px; z-order:1; width:80px; height:20px; } @frame text2 { x:80px; y:80px; width:20px; height:20px; } </STYLE> <P STYLE="flow: text1">But the evil creature spared none <P STYLE="flow: text2">yow!
<STYLE> @frame main { width: 100%; height:100%; layout-policy: rows; } @frame frame1 { parent: main; width: 60%; height: 50%; } @frame frame2 { parent: main; width: 40%; height: 50%; } @frame frame3 { parent: main; width: 100%; height: 50%; } </STYLE> <P STYLE="flow=frame1"> Lorem ipsum.. <P STYLE="flow=frame2"> .. adpiscing elit .. <P STYLE="flow=frame3"> .. adpiscing elit ..
<STYLE> @frame academia { x: 0%; y:0%; width: 100%; height: 100%; } H1, P { flow: academia } P { column-width: 30em } P.footnote { float: bottom } </STYLE> <H1>A new theory</H1> <P>Lorem ipsum.. <P CLASS=footnote>Footnote: Lorem ipsum dolor sit..
Using the 'tile' layout policy in combination with resizable child frames, child frames do not have to be sized in detail.
<STYLE> @frame newspaper { layout-policy: grid; } @frame banner { parent: newspaper; x: 10%; y: 50%; /* proportional placement */ } @frame article1 { parent: newspaper; x: 0%; y: 100%; /* proportional placement */ resize-policy: resizable; } @frame article2 { parent: newpaper; x: 100%; y: 100%; /* proportional placement */ background: gray; resize-policy: resizable; } P { flow: from-predecessor column-width: 30em } H1, P.initial { column-width: max } </STYLE> <H1 STYLE="flow=banner">MY PAPER</H1> <H1 STYLE="flow=article1>Lorum Ipsum</H1> <P CLASS=initial>Lorum Ipsum dolor.. <P>.. <P>.. <H2 STYLE="flow=article2>Yow</H2> <P>Lorum ipsum..
Note the use of two different frame to get a two-column layout. In most cases, using one frame and the 'column-width' property will be simpler.
<STYLE> @frame main { layout-policy: rows; } @frame column1 { parent: main; alpha: 1; width: 50%; resize-policy: resizable; } @frame column2 { parent: main; alpha: 1; width: 50%; resize-policy: resizable; } @frame image1 { parent: main; alpha: 0 displace; x: 50%; y: 50%; /* proportional placement */ } <P STYLE=float: main">Lorum Ipsum dolor.. <P>.. <P>.. <IMG SRC=fish.png STYLE="float: image1">