htmlDump customise columns

For the given code in the example provided

{{ [{FirstName: 'Kurt', Age: 27},{FirstName: 'Jimi', Age: 30}] | assignTo: rockstars }}
{{ rockstars | htmlDump({ className: "table table-striped", caption: "Rockstars" }) }}
{{ [] | htmlDump({ captionIfEmpty: "No Rockstars"}) }}

Is it possible to say set the style of a td element to say the colour red if the rockstars age is equal to 30?

No, normal CSS / HTML rules still apply. You can only apply CSS selectors on the generated HTML and there are no CSS selectors that let you apply style based on Table cell values.

You would need custom JS to traverse each cell and modify the style pragmatically, e.g with jQuery:

$('table tr td').each(function(){
  if ($(this).text() == 30) {
    $(this).css('background-color','red');
  }
});

Would this work if I’m using the Template as an Email Template?

If I’m attempting to render a mini report via a Email Template that is going to display Tabular Data and have colour indicators would it be better to use the TemplateCodePage instead?

No most HTML email clients don’t allow JS for good reason.

If I’m attempting to render a mini report via a Email Template that is going to display Tabular Data and have colour indicators would it be better to use the TemplateCodePage instead?

You could use either, but if you needed to call a lot of C# methods (that aren’t filters) then it’d be easier to use C#.