1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
program FabriqueHtml;
{$APPTYPE CONSOLE}
// http://www.w3schools.com/html/html_tables.asp
uses
SysUtils;
const
nomFichier = 'Document1.html';
var
t: textFile;
iEleve, iNote: integer;
begin
AssignFile(t, nomFichier);
Rewrite(t);
WriteLn(t, '<!DOCTYPE html>');
WriteLn(t, '<html><!-- ' + DateTimeToStr(Now) + ' -->');
WriteLn(t, ' <head>');
WriteLn(t, ' <title>Notes du trimestre</title>');
WriteLn(t, ' </head>');
WriteLn(t, ' <body>');
WriteLn(t, ' <table border="1">');
for iEleve := 0 to 9 do
begin
Write(t, ' <tr><td>Nom de l''élève </td>');
for iNote := 0 to 4 do
Write(t, '<td style="text-align:right">20 </td>');
WriteLn(t, '</tr>');
end;
WriteLn(t, ' </table>');
WriteLn(t, ' </body>');
WriteLn(t, '</html>');
CloseFile(t);
end. |
Partager