2.1. XUL Means Boxes

When learning HTML, <P> tags and heading tags like <H1> are a common starting point. Only after some experience do you realize how invisibly powerful the <SPAN> tag is. An <H1> tag, for example, is just a <SPAN> tag with some CSS styles applied, like display:block and font-size:large. It's not the only such tag either—many are just <SPAN> plus some styling. HTML does not teach <SPAN> first because a plain <SPAN> tag doesn't appear to “do” anything; it's normally invisible.

XUL's <box> tag has the same role as HTML's <SPAN> tag, except that <box> is necessary right from the beginning. It's important that you master your XUL boxes straight away. Listing 2.2 is an XUL fragment showing typical use of boxes to structure content. ...

Get Rapid Application Development with Mozilla™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.