Skip to content

HTML

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

Info

The HTML block is sandboxed and cannot execute JavaScript.

Simple HTML content

import datapane as dp

html = """
<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 {
            color:#eee;
            animation-name: example;
            animation-duration: 4s;
            animation-iteration-count: infinite;
        }
    </style>
    <div id="container">
      <h1> Welcome to my Report </h1>
    </div>
</html>
"""

report = dp.Report(dp.HTML(html))

report.save(path="simple-html.html")