CSV to HTML translation: Difference between revisions
Content deleted Content added
→{{header|REXX}}: added the '''changestr''' bif. -- ~~~~ |
|||
Line 1,608:
PrintStream stdout = System.out;
stdout.
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\">"▼
stdout.println("<title>Csv2Html</title>");
▲ + "<head><meta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\"/>"
stdout.println("<table>");
Line 1,636:
</lang>
'''output simple.html'''
<lang html5><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head><meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
<title>Csv2Html</title>
<style type="text/css">
body{background-color:#FFF;color:#000;font-family:OpenSans,sans-serif;font-size:10px;}
table{border:0.2em solid #2F6FAB;border-collapse:collapse;}
th{border:0.15em solid #2F6FAB;padding:0.5em;background-color:#E9E9E9;}
td{border:0.1em solid #2F6FAB;padding:0.5em;background-color:#F9F9F9;}</style>
</head><body><h1>Csv2Html</h1>
<table>
<tr><td>Character</td><td>Speech</td></tr>
<tr><td>The multitude</td><td>The messiah! Show us the messiah!</td></tr>
<tr><td>Brians mother</td><td><angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry></td></tr>
<tr><td>The multitude</td><td>Who are you?</td></tr>
<tr><td>Brians mother</td><td>I'm his mother; that's who!</td></tr>
<tr><td>The multitude</td><td>Behold his mother! Behold his mother!</td></tr>
</table></body></html></lang>
'''output extended.html'''
<lang html5><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
<title>Csv2Html</title>
<style type="text/css">
body{background-color:#FFF;color:#000;font-family:OpenSans,sans-serif;font-size:10px;}
table{border:0.2em solid #2F6FAB;border-collapse:collapse;}
th{border:0.15em solid #2F6FAB;padding:0.5em;background-color:#E9E9E9;}
td{border:0.1em solid #2F6FAB;padding:0.5em;background-color:#F9F9F9;}</style>
</head><body><h1>Csv2Html</h1>
<table>
<tr><th>Character</th><th>Speech</th></tr>
<tr><td>The multitude</td><td>The messiah! Show us the messiah!</td></tr>
<tr><td>Brians mother</td><td><angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry></td></tr>
<tr><td>The multitude</td><td>Who are you?</td></tr>
<tr><td>Brians mother</td><td>I'm his mother; that's who!</td></tr>
<tr><td>The multitude</td><td>Behold his mother! Behold his mother!</td></tr>
</table></body></html></lang>
=={{header|JavaScript}}==
|