Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read and how they find the site, so we can improve it (Google Analytics).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Markdown/HTML Card

  • Widget
  • v1.0.0
  • Sep 1, 2026
  • MIT license
  • v4.2+ | Built-in

Renders markdown/HTML using the configurable pattern or function with applied attributes or time series values.

Widget Type
  • Latest
Category
  • Cards & Info
Use Cases
  • Smart Building
  • Smart City
  • Industrial Automation

Who it’s for

Dashboard builders who need a block of formatted text that changes with the data — a summary sentence naming the current entity and its reading, a status note that rewrites itself, an instruction panel that names the device it is talking about. Markdown covers the formatting, and placeholders bring in the values.

What it does

The Markdown/HTML card renders markdown or HTML from a pattern that carries live values. The default pattern, ### Markdown/HTML card followed by **Current entity**: ${entityName} and **Current value**: ${Temperature}, renders as a heading and two bold-labelled lines with the entity’s name and its current temperature filled in.

  • Markdown for the formatting, placeholders for the data — ${entityName} and ${keyName} resolve against the datasource, so a sentence reads naturally rather than as a table of values.
  • HTML works where markdown does not, in the same box, so a block can mix a markdown list with an HTML table.
  • A value function replaces the pattern when the text has to be decided rather than filled in — it receives the data and returns the markdown to render, which covers conditional wording and computed sentences.
  • The platform’s default markdown styling can be applied or turned off, and custom CSS layers on top.
  • The Markdown/HTML card renders text: it draws no chart and animates nothing, and a placeholder naming a key that is not in the datasource is left as written.

How to set up

Data keys

The Markdown/HTML card takes any number of data keys, addressed by name in the pattern.

KeyRoleTypeDescription
TemperatureAny value referenced from the textTimeseriesWritten as ${Temperature} in the pattern, matching the key’s name. Attributes work equally well. ${entityName} is available without declaring a key.

Add the keys the text refers to before writing the pattern; an unmatched placeholder renders as literal ${...} text rather than raising an error, which is what a card showing braces is telling you.

Content

SettingDefaultEffect
Use markdown/HTML value functionOffSwitches from a fixed pattern to a function that returns the markdown
Markdown/HTML patternA heading plus entity name and valueThe text rendered, with ${...} placeholders resolved live
Markdown/HTML value functionReturns a title and the entity nameUsed instead of the pattern when the toggle is on; receives the data array

How to customize

  • To change the wording — edit the Markdown/HTML pattern; headings, lists, tables, links and emphasis all render.
  • To decide the text from the data — turn on Use markdown/HTML value function and return a markdown string from the function, which is the way to write conditional sentences.
  • To match the dashboard’s typography — turn off Apply default markdown style and supply your own rules in Markdown/HTML CSS.
  • To reference another reading — add its data key and put ${that key name} where the value belongs.

Tips

  • Stay on the pattern for anything a colleague may need to edit later. A one-line function is more flexible, but a pattern is legible to someone who does not write JavaScript, and most cards never need the extra power.
  • Write the block with real key names and confirm the values resolve before styling anything. Unresolved placeholders are easy to miss inside styled text and obvious inside plain text.

Share Your Widget with the Community

Built a custom widget? Export it as a JSON from ThingsBoard and publish it to the IoT Hub through a simple 4-step wizard (Upload, Listing, Readme, Review & Submit). Share it with thousands of ThingsBoard developers worldwide and get featured in the catalog.