Topic: Reporting

Online Help

Formatting with Html and CSS

Calcpad can be used as a development platform for professional engineering programs. If you are not going to do that, you can skip this chapter.

Html (Hyper Text Markup Language) is a markup language which is created for formatting web pages. You can change the font type, size and weight, the color of the text and to insert tables, images, etc. This is performed by adding special elements called "tags". Each tag is enclosed in angular brackets: "<tag>". Some tags are used in pairs - opening "<tag>" and closing "</tag>". The contents is going in between. For example, if you want to make some text bold, you can use the following tags: <b>Bold text</b>. Even if you are not a professional programmer, you can easily learn some basic Html, to use with Calcpad:

Html code Output
<b>Bold</b> Bold
<i>Italic</i> Italic
<u>Underline</u> Underline
<span style="color:red;">Red</span> Red
x<sup>superscript</sup> xsuperscript
x<sub>subscript</sub> xsubscript
<span style="font:16pt Times-New-Roman;">
    Times New Roman, 16pt
Times New Roman, 16pt

You can put Html tags only in comments, but you can also make them to affect expressions. For example:

'<span style="color:red;"> as simple as ' 2 + 2 '</span>'

will give the following output:

as simple as 2 + 2 = 4

We simply enclosed the expression with two comments. The first comment contains the opening tag '<span style="color:red;">' and the second - the closing tag '</span>'. Everything between the two tags is colored in red. Make sure not to forget the quotes. Otherwise, the program will try to parse the Html code as math expression and will return an error. The following code: style="color:red" is called "inline CSS" (Cascading Style Sheets). It is used to format the look of Html documents. You can learn more about Html and CSS from the following links:

You can also use some of the many free WYSIWYG Html editors that you can find on the Internet.