web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Change font color in H...
Power Automate
Answered

Change font color in HTML table

(0) ShareShare
ReportReport
Posted on by 393

Hi Everyone,

 

I am not able to change the font color following steps in https://www.youtube.com/watch?v=VnWg-Eox37Q&t=1418s (23:33)

 

My HTML code: <font color="@{if(equals(item()?['RA Total'],'0'),'red','black')}">@{item()?['RA Total']}</font>

JAWL_0-1631100080182.png

 

 

Displayed result in email: <font color="black">0</font>

JAWL_0-1631099775677.png

 

Seems like the result returns as text instead of font color change.

Categories:
  • Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @JAWL,

     

    That is a tag which isn't supported anymore in HTML5: https://www.w3schools.com/tags/tag_font.asp

     

    Can you try this instead:

    <p style="color:@{if(equals(item()?['RA Total'],'0'),'red','black')}">@{item()?['RA Total']}</p>

     

  • JAWL Profile Picture
    393 on at

    Hi @Expiscornovus 

    Appreciate your reply but it's not working. Email Result remains the same in text format:

    JAWL_0-1631148200026.png

    My Flow:

    <p style="color:@{if(equals(item()?['RA Total'],'0'),'red','black')}">@{item()?['RA Total']}</p>

    JAWL_1-1631148476431.png

     

  • Verified answer
    Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @JAWL,

     

    The Create HTML table will output characters like < as &lt;.

     

    urlencodedcharacters.png

     

    In the video Reza uses a compose action with an expression to clean up the HTML of that Create HTML table action. He uses the expression below:

    replace(replace(replace(replace(replace(body('Create_HTML_Table'), '&lt;', '<'), '&gt;', '>'), '&amp', '&'), '&#39;', '"'), '&quot;', '"')

     

    Are you using that as well in your flow?

     

    Have a look at this part where he explains why to use this Clean HTML compose action.

    https://youtu.be/VnWg-Eox37Q?t=843

  • ChrisMendoza Profile Picture
    425 on at

    @JAWL- you should use @Expiscornovus suggestion where Reza cleans the HTML. image.png

    <font color="@{if(equals(item()?['Potential Risk'],'No'),'red','green')}">@{item()?['Potential Risk']}</font>

    I initialized my own array so item() is referring to variables('myArray') you would use your appropriate dynamic values.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 233 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 178

Last 30 days Overall leaderboard