The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



DefaultHTMLHead


Unit: SDL_htmlsupport
Class: none
Declaration: function DefaultHTMLHead (Title, Author, CharSet, Stylesheet: string; IncludeBody: boolean): string;

The function DefaultHTMLHead returns the header of an HTML file. The parameters Title, Author, and Stylesheet control whether a corresponding statement is included into the header of the HTML file. If any of these parameters is left empty, the corresponding header line will be omitted. The character set meta information is always included using the parameter CharSet. If CharSet is left empty, the "iso-8859-1" set is used by default.

The IncludeBody parameter determines whether the <body> tag is added to the HTML header.

Examples: The statement astr := DefaultHTMLHead ('My Page', 'John Doe', '', 'mystyle.css', true); assigns the following string to the variable astr:
<html>
<head>
<title>My Page</title>
<meta content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<meta name="author" content="John Doe">
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>

The statement astr := DefaultHTMLHead ('My Page', '', 'ISO-8859-15', '', false); assigns the following string to the variable astr:

<html>
<head>
<title>My Page</title>
<meta content="text/html; charset=ISO-8859-15" http-equiv=Content-Type>
</head>



Last Update: 2012-Oct-20