Overview
Sometimes you'll want to present data in your course in table format. This page provides guidance on how to create a table within the Moodle text editor box.
When to use
Tables are useful for presenting columns of figures, definitions of terms and other data. Do not, however, use tables to organise and stabilise the display of your content, as this will disadvantage any students who will use screen readers to access the course material.
Benefits
Tables ensure that tabular data is positioned properly in columns and rows.
Guide
Step by step instructions
Create a table
-
In the text editor, click the Insert/edit table icon
. (If the function icons and buttons don't display, click Show editing tools at the top of the editor.)
-
In the Insert/edit table window:
- Enter the number of columns (Cols) and Rows you want the table to have.
- Add an outside table Border (pixel width) if you wish, and click Insert.
It is particularly unwise to enter a Width setting. Because end users will view Moodle pages in an immense range of browsers and devices, ranging from text-only mobile browsers to large-screen, high definition displays, defining pixel-based sizing for anything other than the table border is very limiting.
Let the browser window determine the width of the table whenever possible, to reduce the horizontal scrolling required of those with low vision. If you must define cell widths or table widths, use relative values such as percentages, rather than pixel values. Avoid defining cell heights, or the cell will not be able to expand downward to accommodate its content, which will frustrate users with low vision who may enlarge text content.
- In the editing page, enter and format the table text.
- To return to the Insert/edit table window for this table, right-click the table and select Table properties from the screen menu.
- To save changes to your table and the other text, click Save changes.
Define table headers
It’s important to define table headers so that screen readers will identify header cells, as opposed to data cells, for visually impaired users.
- Right click on a table cell you want as a header, right click on the cell to view the screen menu and select Cell > Table cell properties.
- In the Table cell properties > General window, make any desired change to the header Alignment within the cell—by default, header text is centred and in bold type.
- In the Cell type drop-down list, select Header.
- At Vertical alignment, select whether you want the header to display at the Top, Center or Bottom of the cell.
- Select the Scope of the headers—if headers are located at the left of the data cells, the scope will be Row or Row group, if placed above the data cells it will be Column or Col group.
- At the lower left of the window, select Update all cells in row or Update all cells in column as applicable.
- Click Update. The table will display with the nominated header cells differentiated.
Below is a table with 1-pixel cell borders and header cells in the first column—
header text is aligned horizontally Left and vertically Bottom.
Add borders to a table
To add an outside border to a table:
- Right-click the table and select Table properties from the screen menu.
- In the Insert/edit table > General window, in the Border field, enter a number representing the pixel width of the outside table border.
- Select the Advanced tab.
-
In the Advanced window, at Border colour, click the Browse button
.
- In the Select a colour window, select a colour from the Picker, Palette or Named page. Click Apply if necessary, to return to the General window.
- Click Insert to return to the editing page, to complete and save your changes.
To add cell borders to a table in the text editor:
- Right-click within the first table cell, and from the pop-up menu select Cell > Table cell properties.
- In the Table cell properties window, select the Advanced tab.
-
In the Advanced window, at Border colour, click the Browse button
.
- In the Select a colour window, select a border colour from the Picker, Palette or Named page. Click Apply if necessary, to return to the Advanced window.
- At the lower left of the Advanced window, select Update all cells in table from the drop-down list.
- Click Update to return to the editing page, to complete and save your changes.
Advanced guide
For more advanced Moodle table functions, see this helpful forum page.
Additional information
Further assistance
If you experience technical or other issues, consult the Where to get help page.