# Working with tables

Tables are often used in schedules and to show information in columns.

{% content-ref url="/pages/-MIcpb3z27xxF1HcK03M" %}
[Marking up tables](/markup-guide/marking-up-tables.md)
{% endcontent-ref %}

## How to insert a table in Edit mode

1. Enter Edit mode.
2. Click **Insert** and then **Insert table**.
3. Click **Update**.

Laws.Africa will add a simple table with two rows and two columns.

## **How to copy a table from a Word document**

You can copy and paste a table from a Word document.

1. Highlight the table in the Word document.
2. Copy the table to the clipboard (with Ctrl+C or choosing **Copy** from the **Edit** menu).
3. In Laws.Africa, enter Edit mode.
4. Position the cursor at the start of the line where you would like to place the table.
5. Paste the table with Ctrl+V or by choosing **Paste** from your browser's **Edit** menu.
6. Hit Tab until it has been indented appropriately.

## How to edit a table

![](/files/-Lve79FJlQoh9uZlRJq2)

1. Click **Edit table** to enter table edit mode.
2. Make your changes to the table.
3. Insert and delete columns and rows by clicking **Insert** and **Delete**.
4. Merge cells by highlighting them and clicking **Merge cells**.
5. Mark up heading cells by highlighting them and clicking **Heading**.
6. Resize columns by clicking and dragging on the border between them.
7. Left align, center and right-align text by clicking the editor alignment buttons.
8. Click **Update** to save your changes, or click **Cancel** to discard the&#x6D;**.**

## **Exercise**

Copy the table below into your document:

1. Enter Edit mode.
2. Copy the text below.
3. Paste the table into your document and click **Update**.

```
    TABLE
      TR
        TC
          Vegetables

        TC
          Fruits

      TR
        TC
          Cucumber

        TC
          Apples

      TR
        TC
          Carrots

        TC
          Pears

      TR
        TC
          Lettuce

        TC
          Oranges

      TR
        TC
          Tomatoes

        TC

```

It should look something like this:

| Vegetables | Fruits  |
| ---------- | ------- |
| Cucumber   | Apples  |
| Carrots    | Pears   |
| Lettuce    | Oranges |
| Tomatoes   |         |

Now make the header cells bold.

1. Click **Edit table**.
2. Highlight the header cells individually or as a group and click **Heading**.

A tomato is [actually a fruit](https://en.wikipedia.org/wiki/Tomato#Fruit_versus_vegetable). Put it under both columns by merging the two cells in the tomato row.

1. Select the Tomatoes cell and the one next to it by dragging the mouse.
2. Click **Merge cells**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.laws.africa/how-tos/mark-up/tables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
