While the export filter only needs to consist of a single .layout file, which in this case could be called html.layout, you may also want to add two files called html.begin.layout and html.end.layout. The former contains the header part of the output, and the latter the footer part. JabRef will look for these two files whenever the export filter is used, and if found, either of these will be copied verbatim to the output before or after the individual entries are written.
Note that these files must reside in the same directory as html.layout, and must be named by inserting .begin and .end, respectively.
In our example export filter, these could look like the following:
html.begin.layout:
<HTML>
<BODY> text="#275856">
<basefont size="4" color="#2F4958" face="arial">
html.end.layout:
</BODY>
</HTML>
The file html.layout provides the default template for exporting entries. If you want to use different templates for different entry types, you can do this by adding entry-specific .layout files. These must also reside in the same directory as the main layout file, and are named by inserting .entrytype into the name of the main layout file. The entry type name must be in all lowercase. In our example, we might want to add a template for book entries, and this would go into the file html.book.layout. For a PhD thesis we would add the file html.phdthesis.layout, and so on. These files are similar to the default layout file, except that they will only be used for entries of the matching type. Note that the default file can easily be made general enough to cover most entry types in most export filters.