Skip to content


The HTML block allows you to add raw HTML to your app, allowing for highly customized components, such as your company's brand, logo, and more.


The HTML block is sandboxed and cannot execute JavaScript.

Simple HTML content

import datapane as dp

html = """
    <style type='text/css'>
        @keyframes example {
            0%   {color: #EEE;}
            25%  {color: #EC4899;}
            50%  {color: #8B5CF6;}
            100% {color: #EF4444;}
        #container {
            background: #1F2937;
            padding: 10em;
        h1 {
            animation-name: example;
            animation-duration: 4s;
            animation-iteration-count: infinite;
    <div id="container">
      <h1> Welcome to my App </h1>

app = dp.App(dp.HTML(html))"simple-html.html")