---
title: "web insert · RUAL Documentation"
description: "Adds new HTML to the page: a new row at the end of a table, a new message at the top of a list. A RUAL web block in the web actions group."
canonical: https://docs.rual.nl/block-types/web/web_insert
language: en
---

# web insert

This block is part of the [`web`](https://docs.rual.nl/block-types/web) group and was last modified in core [`v15.0.1`](https://docs.rual.nl/core-versions/150001).

Adds new HTML to the page: a new row at the end of a table, a new message at the top of a list.

- flow

- key `value` The element's data-key: a row of web for each, or the key a web action received.

- target `value` A CSS selector instead of a key, e.g. `#cart-count`.

- html `value` required

- position `value` append, prepend, before or after.

Default `append`

- flow

Adds a browser update to the web action's answer: `html` is inserted relative to the element by `position`: append (default, last child), prepend (first child), before or after (siblings). Any other position is an error. Give inserted rows a data-key (web template's key pin) so later actions can address them. Addressed by `key` (matches [data-key="<key>"]) or, when key is empty, `target` (a CSS selector); neither is an error that stops the flow. Only in a flow started by web_action (an error elsewhere). Updates apply in the order the blocks ran.

| `append row` |
| --- |
| `prepend` |
| `add to list` |

After [create document](https://docs.rual.nl/block-types/storage/function_create_document_from_mutations) stores the new product, [web template](https://docs.rual.nl/block-types/web/web_template) renders its row with the guid as key, so later actions can reach it, and [web insert](https://docs.rual.nl/block-types/web/web_insert) adds that row to the element the target pin selects. position says where: append, the default, and prepend go inside the element as its last or first child, before and after go next to it as a sibling. Any other position is an error.

[![Studio canvas example for the web insert block: adding a row to a table.](https://docs.rual.nl/canvas-examples/web_insert.png)](https://docs.rual.nl/canvas-examples/web_insert.png?v=3)

## Used in these guides

These documentation pages use or explain this block:

- [Escaping and Security](https://docs.rual.nl/web/security)

- [Lists and Tables](https://docs.rual.nl/web/lists)

- [Migrating from State Pages](https://docs.rual.nl/web/migrate-from-state-pages)

- [Web Actions](https://docs.rual.nl/web/actions)

- [Block Templates, Combinations That Work](https://docs.rual.nl/block-types/block-templates)

- [Example: Inventory Tracker](https://docs.rual.nl/examples/inventory-tracker)

- [Example: Task Management App](https://docs.rual.nl/examples/task-management)

- [Build Your First CRUD App](https://docs.rual.nl/getting-started/first-crud-app)

## Version history

Introduced in [`v15.0.1`](https://docs.rual.nl/core-versions/150001).

- [`v15.0.1`](https://docs.rual.nl/core-versions/150001): block added in this release.

- [Back to `web`](https://docs.rual.nl/block-types/web): Return to the main group to view all sub-groups

- [Back to `web actions`](https://docs.rual.nl/block-types/web?group=web%20actions): Return to the group to view all blocks within this group
