HTML
Encoding Images
http://www.sweeting.org/mark/blog/2005/07/12/base64-encoded-images-embedded-in-html
src="data:image/gif;base64,R0lGODlhUAAPAKIAAAsLav........... " alt="Image of Stuff" width="80" height="40" />
http://www.motobit.com/util/base64-decoder-encoder.asp
HTML Redirect
index.html
<HTML>
<HEAD>
…
<SCRIPT language="JavaScript">
<!--
window.location="blah/foo.php";
//-->
</SCRIPT>
…
</HEAD>
<BODY>
…
</BODY>
</HTML>
CSS Alternate Row Color
This style does not seem to work properly when sending html email to MS Outlook or GMail.
<style type="text/css"> tr:nth-child(odd) {background-color: White;} tr:nth-child(even) {background-color: LawnGreen;} </style>
Flag a row color red in a script.
http://gallery.technet.microsoft.com/scriptcenter/Powershell-Script-for-13a551b3
CSS override style
<style type="text/css"> TR.Crit TD {background-color:#FF6600; color: black;} TD.Crit {background-color: Red !important; color: black;} </style>
Example
<!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> <title>HTML TABLE</title> <style type="text/css"> BODY{background-color:white;} TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;} TH{border-width: 1px;padding: 1px;border-style: solid;border-color: black;background-color:MidnightBlue; color:Yellow} TD{border-width: 1px;padding: 1px;border-style: solid;border-color: black;background-color:PaleGoldenrod} TR.Crit TD {background-color: Salmon; color: black;} TD.Crit {background-color: Red !important; color: black;} </style> </head><body> <table> <colgroup><col/><col/><col/></colgroup> <tr><th>Name</th><th>Length</th><th>LastWriteTime</th></tr> <tr><td>questionnaire.xlsx</td><td>73144</td><td>7/2/2013 11:48:08 AM</td></tr> <tr><td>test ddn.zip</td><td>3736125</td><td>12/6/2013 9:15:10 AM</td></tr> <tr><td>Modem.JPG</td><td>1179939</td><td>6/25/2013 9:36:27 AM</td></tr> <tr class="Crit"><td class="Crit">ubuntu.iso</td><td>256845824</td><td>12/6/2013 7:58:50 AM</td></tr> <tr><td>rrr-12-04.iso</td><td>244570112</td><td>12/4/2013 11:04:31 PM</td></tr> <tr><td>master.zip</td><td>335021</td><td>11/27/2013 2:24:30 PM</td></tr> </table> </body>
$PreMessage = @"
<!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>
<title>HTML TABLE</title>
<style type="text/css">
BODY{background-color:white;}
TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}
TH{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:MidnightBlue; color:Yellow}
TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;}
tr:nth-child(odd) {background-color: White;}
tr:nth-child(even) {background-color: LawnGreen;}
</style>
</head><body>
“@
$html = $PreMessage + ($Data | ConvertTo-Html -Fragment)
$html | Out-File C:\Temp\Data.html