# Using prettytables with Pluto

**URL:** https://discourse.julialang.org/t/using-prettytables-with-pluto/69895
**Category:** General Usage
**Tags:** pluto
**Created:** [October 16, 2021, 12:45pm UTC](https://discourse.julialang.org/t/using-prettytables-with-pluto/69895 "2021-10-16T12:45:48Z")
**Posts on this page:** 1
**Showing post:** 25

<div class="post-metadata">

### Author: ![adannenberg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adannenberg/32/7869_2.png) [@adannenberg](https://discourse.julialang.org/u/adannenberg)
#### Post date: [November 23, 2024, 9:59pm UTC](https://discourse.julialang.org/t/using-prettytables-with-pluto/69895/25 "2024-11-23T21:59:13Z")

</div>

pretty\_table(HTML, …) looks much nicer in Pluto than pretty\_table(…) which (I think) defaults to the text backend. However, unlike the text backend, pretty\_table(HTML,…) shows the entire table rather than having a vertical scrollbar for tables with many rows. Is there an override for this default, i.e. can one have the better looking display of the HTML backend and still have a scrollable display?

for others who are interested in this: i found a way but it’s ugly. i’m hoping someone can point out an argument to pretty\_table that i’m unaware of.

here’s my ugly solution for pretty printing dataframe df in Pluto:

```julia
using HypertextLiteral, PrettyTables
html_table = pretty_table(String, df, backend = Val(:html),formatters =...)
scrollable_table = @htl("""
    <div style="max-height: 400px; overflow-y: auto; border: 1px solid #ccc;">
        $(HTML(html_table))
    </div>
""")
scrollable_table

```

as a further addendum: it would be great to have the column headers remain visible while scrolling down in either the text or html backends. is that possible?

---

_[View the full topic](https://discourse.julialang.org/t/using-prettytables-with-pluto/69895)._
