Skip to content

Commit

Permalink
Update basic-header.qmd
Browse files Browse the repository at this point in the history
rich-iannone committed Dec 22, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent b176dd6 commit 24a7bc1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/get-started/basic-header.qmd
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ jupyter: python3
html-table-processing: none
---

The way that we add components like the **Table Header** and *footnotes* in the **Table Footer** is to use the `tab_*()` family of methods. A **Table Header** is easy to add so let's see how the previous table looks with a *title* and a *subtitle*. We can add this component using the `tab_header()` method:
The way that we add components like the **Table Header** and *source notes* in the **Table Footer** is to use the `tab_*()` family of methods. A **Table Header** is easy to add so let's see how the previous table looks with a *title* and a *subtitle*. We can add this component using the `tab_header()` method:

```{python}
from great_tables import GT, md, html
@@ -23,16 +23,16 @@ islands_mini = islands.head(10)
)
```

The **Header** table component provides an opportunity to describe the data that's presented. The `subtitle`, which functions as a subtitle, is an optional part of the **Header**. We may also style the `title` and `subtitle` using Markdown! We do this by wrapping the values passed to `title` or `subtitle` with the `md()` function. Here is an example with the table data truncated for brevity:
The **Header** table component provides an opportunity to describe the data that's presented. Using `subtitle=` allows us to insert a subtitle, which is an optional part of the **Header**. We may also style the `title=` and `subtitle=` using Markdown! We do this by wrapping the values passed to `title=` or `subtitle=` with the `md()` helper function. Here is an example with the table data truncated for brevity:

```{python}
# Make a display table with the `islands_tbl` table;
# put a heading just above the column labels
gt_tbl = (
GT(islands.head(2))
.tab_header(
title = md("Large Landmasses of the World"),
subtitle = md("The top ten largest are presented")
title = md("Large Landmasses of the *World* 🌐"),
subtitle = md("The top **ten** largest are presented")
)
)

0 comments on commit 24a7bc1

Please sign in to comment.