gt-extras
  • Get Started
  • API Reference
  1. HTML Helpers
  2. gt_hyperlink
  • API Reference
  • Plotting
    • gt_plt_bar
    • gt_plt_dot
  • Colors
    • gt_highlight_cols
    • gt_hulk_col_numeric
    • gt_color_box
  • Themes
    • gt_theme_538
    • gt_theme_espn
    • gt_theme_guardian
    • gt_theme_nytimes
    • gt_theme_excel
    • gt_theme_dot_matrix
    • gt_theme_dark
    • gt_theme_pff
  • Icons and Images
    • fa_icon_repeat
    • gt_fa_rating
  • HTML Helpers
    • gt_hyperlink
    • with_tooltip

On this page

  • gt_hyperlink
    • Parameters
    • Returns
  1. HTML Helpers
  2. gt_hyperlink

gt_hyperlink

gt_hyperlink(text, url, new_tab=True)

Create HTML hyperlinks for use in GT object cells.

The gt_hyperlink() function creates properly formatted HTML hyperlink elements that can be used within table cells.

Parameters

text : str

A string that will be displayed as the clickable link text.

url : str

A string indicating the destination URL for the hyperlink.

new_tab : bool = True

A boolean indicating whether the link should open in a new browser tab or the current tab.

Returns

: str

An string containing the HTML formatted hyperlink element.

gt_fa_rating
with_tooltip