class metadata

Declare class metadata to assign one or multiple space-separated or comma-separated classes to an Aneamal file or quotation block. Classes can be leveraged by other web technolgies, for example in Cascading Style Sheets with the selector . to add styling and in JavaScript with the className property.

Examples

The first example assigns the class wide to the Aneamal file.

@ class: wide

The second example assigns three classes to a quotation block: the class wise, the class words and the class historic. Mind that there is no practical difference in class metadata declarations between space- and comma-separated classes. The order of classes is irrelevant.

> @ class: wise words, historic
> Ich bin ein Berliner.

For developers

If class metadata is declared, the Aneamal Translator adds a HTML class attribute in its HTML output. The class attribute for a webpage’s main file is added to the HTML body element. So the first example is translated to:

<body class='wide'>

In the second example the class attribute is added to the HTML blockquote element representing the quotation block:

<blockquote class='historic wise words'>
<p>Ich bin ein Berliner.</p>
</blockquote>

These classes could be used in CSS to apply a different style now. For instance, the following rule would apply a certain font to any content with the historic class:

.historic {
	font-family: "Times New Roman", serif;
}