# Tags

Tag a block with `#`, and the tag gets a color, an icon, fields and a page of its own.

A tagged block is an entity. It is not stuck on one page: it can show on many.

![Three tagged blocks: a person with a company field and a #person tag, a project with a Planning choice, an end date and a #project tag, and a ticked task with a #task tag, Done and a day](img/tagged.webp)
*Tagged blocks show the tag’s icon, some fields, then the tag.*

## Tag a block

1. Type some words, then `#` and a name: `Order the cabinet handles #task`.
2. A menu shows the tags you have. Pick one, or keep typing and choose *Create #name*.
3. Press `Enter` or `Tab`, or just leave the block. The tag moves to the end of the block as a colored chip. `Space` does it too when the word is the whole name of a tag you have: `#task ` tags at once.

![A block reading “Order the grout #ta” with the Tag this block menu under it: #task, and Create #ta](img/tagmenu.webp)
*Typing # opens the tag menu.*

- Leaving a block tags it only if you typed in that block. Clicking into a block that ends in `#name` and away again changes nothing.
- `#` works straight after a word too: `handles#task`.
- `#` at the very start of a block is markdown: `# ` makes a heading. It never tags.
- `##`, and a `#` inside a web address, never tag.
- A tag keeps its name as you type it, with its capitals and spaces. A new name goes on past a space until you press `Enter`, so `#Reading List` is one tag. Capitals never make another tag: `#reading list` is the same one.
- A block can have more than one tag.
- `#task` comes with three fields: **Due** (a date), **Project** (picks a `#project`) and **Done** (a checkbox before the name).
- Click a tag chip to go to its tag's page. Right-click it for *Open #name* and *Remove #name*.
- To take a tag off, point at its chip: its **#** turns into **✕**. Click the **✕**. *Remove #name* in the block's menu (right-click the bullet) does the same. `Backspace` never takes a tag off.

## Entities live on their own

No page owns an entity. It can show on many pages, and it is the same entity in each one: change it in one place and it changes everywhere.

- **Show it on another page**: select the block (`Esc`), copy it, and paste it on the other page. It comes back as itself, not a copy.
- **Make a copy**: `⌘D`, or *Duplicate* in the block's menu, makes a new entity right after it, with its name, tags, fields and the blocks inside it. The copy is an entity of its own: change one and the other stays as it was.
- **Paste a copy**: `⌥⌘V`, or *Paste as copy* in the block's menu, pastes what you copied as new blocks, never the same ones.
- **Move it**: drag its bullet, press `⌘⇧↑` / `⌘⇧↓`, or use [Move to](outlining.md#move-to). Only that showing moves.
- **Write after it**: `Enter` at an entity starts a new block of the page after it.
- **Open it**: click its icon or bullet.
- `Tab` and `⇧Tab` indent and outdent it where it shows. You can indent blocks *into* it too.
- **Copy link** in its menu copies a link to it.

Plain blocks (with no tag) work the same way. No page owns a block: copy one and paste it on another page, and it is the same block in both places.

### An entity's own page

Click an entity's icon to open it. Its page shows:

- its icon above the title;
- its tags, and **every** field;
- its blocks;
- in the right panel, [Backlinks](links.md#linked-here): the pages it is shown on, the blocks that mention it, and the fields that point at it.

![The page of the person Priya Shah: her person icon, the #person tag and a box with Company, Phone and Email, the fields button at the top right; the right panel's Links view shows her Backlinks, one row for each place: the page she is shown on, two mentions, and Owner: Priya Shah from a field](img/thing.webp)
*An entity’s own page.*

### Deleting an entity

- If it is used only here, *Delete* moves it to the Trash.
- If it is used anywhere else (shown on another page, mentioned, or pointed at by a field), *Delete* only removes it from this page. Fennick looks through the whole notebook for this, pages you haven't opened too. `⌘Z` puts it back.
- If Fennick can't read where it is used just then, nothing goes to the Trash: an entity shown on this page from elsewhere is removed from this page, and anything else stays, and Fennick says to try again.
- *Delete everywhere* in the block's menu always moves it to the Trash.
- `Backspace` on an empty entity does the same as Delete.

The Trash can put anything back. See [Trash](op-log.md#trash).

## Tag pages

The first time you use a tag, Fennick makes it. Click a tag chip, or a tag in [Tags](#tags-list), to open its page. A tag's page has two sides, at the top: **Template** and **All** (as in *All tasks*, with how many there are). Fennick remembers the side you used last for each tag.

### The template

Click **Template** (it then reads *Editing #name template*). It is laid out as a #name page is, with the tag's cover and icon where an entity's sit, and at its foot a **Preview** of a #name block (a computer only). Here you set:

- **Color**: click the **#** before the tag's name and pick a color. A new tag takes the color used least so far, so neighbours differ. A block with several tags shows them all in its bullet: one equal slice of color per tag, in the order its tags show. Folded, its glow is split the same way. The blocks inside it take the first tag's color. To stop that on one block, right-click its bullet (or open its menu on a phone) and pick **No color**: that block and the ones inside it go plain. Pick it again to bring the color back. With blocks selected, **No color** sets them all.
- **Icon**: point above the name for *Add icon*, or click the icon. Search the icons by name, pick one, or *Remove icon*. The icon takes the place of the bullet on its blocks. The icon has its own color, picked in the icon menu or in the second row of the **#**'s colors; until you pick one it follows the tag's.
- **Cover**: point above the name for *Add cover*, then *Change cover* to pick a gradient, a photo, your own picture or a link, as on any page. Every #name page without a cover of its own shows it.
- **Description**: type under the name what the tag is for. It shows when you rest the mouse on the tag anywhere.
- **Plural**: in the tag's **⋯**, *Plural…* sets the word for many of them, such as *people* for `#person`. Without one, Fennick works it out, such as *books* or *boxes*.
- **Fields**: click *Add a field*, or click a field to open its menu. See [Fields](fields.md).

On a phone, *Add icon* and *Change cover* are in the tag's **⋯**. The side a tag opens on is remembered on every device.

### The All side

The **All** side lists every entity with that tag, wherever it shows. A tag starts with one **Table**. *Add a view* adds a Board, a Calendar, a Gallery, a Chart, a Canvas and more. See [Views](views.md).

To list a tag's entities on any page, with the same filters and sorts, write a [query block](queries.md).

### The Tags list

**Tags**, in the sidebar, lists every tag with its fields and how many entities wear it.

- Type in *Search tags* to find a tag, or a tag with a field of that name.
- The filter button shows *Every tag*, *In use* or *Not used yet*. *Sort* puts them by *Most used*, *Name* or *Last used*.
- **New tag** makes one: name it and click *Make it*.
- Point at a tag for its **⋯**: *Open*, *Open in new tab*, *Edit the template* and *Delete tag…*.

### Delete a tag

Pick *Delete tag…* in the tag's **⋯** menu (on its template, or in the Tags list). Fennick asks first and says how many entities wear it. The tag comes off every block. Blocks that held a value in one of its fields keep that value as a field of their own. One `⌘Z` puts it all back. The tags Fennick comes with (such as `#task`) cannot be deleted.

## A tag that builds on another

A tag can build on another tag and take its fields. For example, `#routine` builds on `#task`, so every `#routine` block has Due, Project and Done as well as its own fields.

1. Open the tag's page and go to its [template](#template).
2. The first row of the fields is **Builds on**. Click *Add a tag* and pick a tag.
3. That tag's fields now show after the tag's own fields. Each one ends with the tag it comes from.

- To change a field that comes from the other tag, click its name. The change goes on that tag, so it shows everywhere that tag is used.
- On a block, each field's icon is in the color of its tag: your tag's own fields in its color, the other tag's fields in that tag's color, and the block's own fields in grey.
- If two tags have a field with the same name, the nearer one wins: the tag's own field hides the one it would take.
- To stop, point at the tag in the Builds on row and click its **✕**. Blocks keep the values they hold, as fields of their own. `Cmd+Z` puts it back.
- A tag can build on more than one tag. The picker never offers a tag that already builds on this one, so there are no loops.
- When you delete a tag that others build on, their blocks keep its values as fields of their own.
- A tag's page also lists the blocks of the tags that build on it: the `#task` page shows your `#routine` blocks too, and its count says how many come through `#routine`. To see only its own, click *Filter* and pick *Only #task itself*. Agents' queries by tag work the same way.
