Embedded styles

A formatting instruction can often be attached directly to the element it applies to, and attributes are generally used for this purpose. In XHTML, the Style attribute contains formatting instructions:

<p style="color:red">DANGER: This is an Inline style</p>

The primary benefit of this approach is that the document author has complete and direct control over the appearance of every element instance.

But this is really just a hybrid approach, mixing descriptive markup with formatting markup. As such, it still requires the document author to understand formatting instructions, and forces him to apply them to every element instance.

Get XML Companion, The, Third Edition 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.