XHTML elements supported in Certificates of Completion

Tips & Tricks for both Qarbon hosted and Self-Hosted

Moderators: James, Rado

Site Admin
User avatar
Posts: 51
Joined: Sat May 27, 2006 1:27 am
Location: Dolny Kubin, Slovakia

XHTML elements supported in Certificates of Completion

Postby Rado » Tue Mar 26, 2013 3:34 am

When creating Certificate of Completion templates in ViewletCentral, some XHTML elements are supported to allow you to format the text of the certificate. Remember that the certificate text must be well-formed - this means that all elements must be closed (paired). For unpaired elements, such as hr or br, just use the minimized syntax: <hr /> or <br />

For the PDF Certificates of Completion, only a limited subset of XHTML is supported. Most of the basic formatting tags are supported: <h1> through <h6>, <b>, <i>, <u>, <strong>, <em>. You can also use <sub> and <sup> for a subscript and superscript text, respectively. The <code> element can be used as well.

By default, the sans-serif font is used for all text. You can control the font-family, color and size using the style attribute, for example, style="font-family:times; font-size:14pt;". For this purpose, you can use <div> or <span> elements in addition to elements mentioned above.

You can also use unordered and ordered lists: the <ul>, <ol> and <li> elements. Hyperlinks are also supported, but you are responsible for styling them properly. If you just use the <a> element, the text will be rendered as black with no decorations, making it hard to tell that it is actually a clickable hyperlink. It is recommended to use the style attribute to adjust the text color and/or make it underlined.

Currently, it is not possible to control text alignment or background color using the style attribute - by default, all text within a certificate is centered. If you need to left-align the text, there is a workaround. If you place an empty unordered list into your template, all text following the list element will be left-aligned. The list must have a single blank item, like this: <ul><li></li></ul>

The <img> element, while accepted, will not work as expected. Any image placed into the template will always be rendered at the top of the template, and will push the template text down. This way, it can only be used to embed a custom header bar into a template, and its use is limited and not recommended. You will have to use an absolute image URL pointing to your own server.

Return to FAQs - VCL

Who is online

Users browsing this forum: No registered users and 1 guest