83 Tables & Textboxes

Hugh McGuire

This chapter will cover how to insert and customize tables and textboxes in your book in Pressbooks.

How to Create Tables in Pressbooks

For best results including tables in your book, use our Table Creator tool in the Visual Editor.

Log in to your book. Go to Text / Organize and click on the chapter in which you would like to add a table.

Click on the toggle bar at the top right to show the full formatting toolbar.

toggle toolbar
Toggle toolbar

Then use the Table Creator tool at the bottom left to create a table in your book.

table tool

Once you have created your table and filled it with text, you can add styles such as headings as you would normally, by highlighting the text and choosing a style from the dropdown menu in the toolbar.

To edit the table in other ways, place your cursor in any cell and click on the Table Creator button once again. From this menu you can:

  • Insert another table within a cell
  • Access the table properties (see below)
  • Delete the entire table
  • Edit cell, row and column properties
  • Merge and split cells
  • Add and remove rows and columns
  • Copy, cut and paste rows and columns
Table menu
Table menu

Table Properties

To access your table properties, click anywhere in the table, then click the Table icon on the visual editor toolbar. From the dropdown menu, select Table properties.

Through Table Properties, you can:

  • Adjust the width and height of your table
  • Adjust the cell padding and cell spacing
  • Increase or decrease the weight of the border
  • Add a caption
  • Change the alignment
  • Change the class
Table properties window in your chapter editor

Adjust Width and Height

Width and Height properties in the table properties window

The width of your table is set as a percentage of the page size or as a pixel value. For print, this width size remains static.

In digital versions of your book (for instance, your webbook or EPUB file) a table with a width set by percentage will be responsive to the device  – for example, a reader viewing the table on their phone will see a far narrower table than a reader that view the same table on a large computer. Both readers see the entire table within their screen.

A table set in pixels will be static on all exports and not responsive to the device.

Actual displayed widths may also vary depending on the content inside the table. For instance, if the content inside the table exceeds the width percentage or pixel value you’ve set, the table will still expand past those parameters to display all of the content.

By default, the width of your table will be set at 100%. This means that the table will take up the entire width of the page and end at the left and right margins.

You can increase or decrease your table’s width by changing the percentage or settings a pixel value.

To set a percentage width: Enter “50%” (or other value) next to Width in the Table Properties window

To set a pixel width: Enter “50px” (or other value) next to Width in the Table Properties window

Width property set to 50%

A table with a 50% width would render like this in the webbook:

A table set at 100% width and a table set at 50% width

Table height, by contrast, is measured only in pixels, or “px” because height is static across all export types.

There is a minimum height pixel value that you can set a table to, and the minimum height will depend on how many rows your table has. A two-row table, for example, cannot have a pixel height value of less than 50px; the table will return to the default size if a value lower than that is entered.

To set a pixel height: Enter “100px” (or other value) next to Height in the Table Properties window.

The height property in the table properties window

Tables with custom heights may look like this in your webbook:

Tables at default, medium, and large heights.

Adjust Cell Padding & Spacing

NOTE: These options aren’t currently supported, but watch this space! We’ve got improvements in the works.


Change Border Weight

You can increase or decrease the weight of your border by changing the quantity next to Border in the Table Properties window.

The default weight for the border is “1.” The higher the number, the more thick your table border will be.

Table properties window with the border property highlighted
NOTE: The Border property is not fully supported at this time. But watch this space! We’ve got improvements in the works.

Table Captions

The table caption option can be enabled by checking the box next to Caption on the Table Properties window. Be sure to click OK after you’ve enabled this feature.

Table properties window with caption property highlighted

After, you’ll see a blank space above your table in the visual editor. Click in this space to type your table caption.

Visual editor with table caption highlighted

The caption will display below your table in your Pressbooks webbook.

A table caption below a table in the webbook.

In your ebook and print exports, the caption will display on top of the table.

The caption above the table in the PDF export


You can change the alignment of your table by clicking on the Alignment dropdown menu in the Table Properties menu.

The default alignment for all tables is “None.” You can change the alignment to Left or Right.

Table properties with alignment property highlighted

Your aligned tables should look like this in your webbook and exports:

None, Right, and Left aligned tables

Right and left aligned tables will also automatically have body text wrap around them in your webbook.

Text wrapped around tables in the webbook.

This wrapping feature is  not yet available for exports other than the webbook.

NOTE: While there is currently an option to align tables at center, we do not fully support the feature at this time. Watch this space for improvements to our table options.


You can change the class of your table by clicking on the dropdown menu next to Class in the Table Properties window. Each class defines a preset look for the table.

All tables default to the Standard class. You can choose from four classes:

  • Standard
  • No lines
  • Lines
  • Shaded
Standard, No Lines, Lines, and Shaded tables.

Be sure to click OK after you make any changes to the class.

How to Create Textboxes in Pressbooks

To add a textbox to your post, click on the toggle bar at the top right to show the full formatting toolbar.

toggle toolbar
Toggle toolbar

Then find the “Textboxes” menu and make your selection. This will insert an empty textbox into your post. Alternatively, you can highlight your text first, then choose the textbox style you need and see it appear with your text already inside:

Choose your textbox style
Choose your textbox style

Textboxes can serve many purposes, and Pressbooks has several preset styles to suit your needs, including many that are useful for textbooks and workbooks. Some of the more specialized styles include:

Learning Objectives

Type your learning objectives here.

  • First
  • Second

Key Takeaways

Type your key takeaways here.

  • First
  • Second


Type your exercises here.

  • First
  • Second


Type your examples here.

  • First
  • Second

How To Customize Your Textbox Colors

You can customize your textbox colors in Pressbooks on four themes:

  • Clarke
  • Asimov
  • Jacobs
  • McLuhan

To change your textbox colors from their default palette, follow these steps:

1. Go to Appearance > Theme Options from the left-hand menu of your book’s dashboard

Click Appearance, then Theme Options, then Global Options

2. Scroll down to see your customization options for Examples, Exercises, Key Takeaways, and Learning Objectives 

You can select colors for the header color, header background, and background for each of these four textbox types.

3. Click Select Color next to the element you’d like to change (Header Color, Header Background, or Background)

The graphic user interface that you can select your new color from.

This opens up the color picker. You can input your own color hex code, choose a color from the bottom row, pick a hue from the spectrum, and pick a shade from the sidebar. Click Default to return the element color to its default.

4. Click Save Changes at the bottom of the page

All textbox color customizations will affect every textbox of that specified type in your book. For example, if you change the Key Takeaways Header Background to green here, all Key Takeaways in your book will now have a green header background.

This change affects all export types. You can see the new, custom color textboxes in your visual editor.

You can now see the customized textbox in your visual editor, webbook, and exports.

Custom Textboxes

You can also insert a custom textbox using the textbox menu, which allows you to add a custom CSS class that you can then style in the CSS editor. You can also customize the existing styles if you’re confident with CSS. For more on this, see our guide chapter on customizing your CSS.

NOTE: Some textboxes can be a little temperamental; in particular the standard and shaded styles don’t like you hitting “Enter,” which will create a new textbox below the existing one. To get around this, you need to use a soft return by hitting “Shift+Enter” to get a new line.

Prefer to watch and learn? Here’s a brief visual intro to adding textboxes and tables in Pressbooks.


Icon for the Creative Commons Attribution 4.0 International License

Pressbooks User Guide by Hugh McGuire is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book