Creating Text
There are two methods of creating text elements in the HTML package. The first method, calling Html_Element_Text_Line_Create(), creates a text element that uses the default font and has a line break (<BR>) at the end. The second method, calling Html_Element_Text_Create(), gives the caller no built-in HTML formatting (no automatic <BR> tag at the end) and allows the caller to specify the font to be used.
- Create the text element with
Html_Element_Text_Create()orHtml_Element_Text_Line_Create(). - Add the element to the page with
Html_Page_Element_Add().
If the text contains characters that have special representations in HTML, you can convert those characters with Html_String_Entity_Encode().
The sample source for the HTML sample source contains several examples of creating text elements. See the Sample Program.