Building Dashboards with Dash and Plotly
Alex Scriven
Data Scientist
dash.html components.H1().Div()<div>
<div style=
"background-color: red;
width:250; height:250;">
</div>
<div style=
"background-color: lightblue;
width:250; height:250;">
<h1>This box</h1>
</div>
</div>
.Br() = New line break.Img() = Insert an image
.Ul() \ .Ol() & .Li() = Create lists.Ul() for unordered list (bullet-points, like these!).Ol() for ordered list (numbered-points).Li() for each list element
app.layout = [html.Img(src='www.website.com/logo.png'), html.H1("Our Sales Dashboard")]

Set and format text content
.P() or .Span() = Insert plain text.P() or .Span()).B() = Bold some text.I() = Italicize some text
Some complex formatting:
app.layout = [ html.H1("Our Sales Dashboard"),html.Span(children=[f"Prepared: {datetime.now().date()}"," by ", html.B("Jessie Parker, "),html.I("Data Scientist")])]

$$
app.layout = [
html.H1("Our Sales Dashboard"),
html.Span(children=[
f"Prepared: {datetime.now().date()}",
html.Br(),
" by ", html.B("Jessie Parker, "),
html.Br(),
html.I("Data Scientist")])
]

Building Dashboards with Dash and Plotly