Guide to the Tagging System in World Anvil Codex | World Anvil

Guide to the Tagging System

written by Ondo, update by SoulLink
Tags are a quick way of organising your world's articles and, unlike categories, you can have multiple tags in a single article. However, tags don't appear in the homepage like categories do, meaning they can't replace categories.  

Usecases for tags

Tags are a way to organize articles and other resources within your world beyond categories. When starting out just using categories for your organization is more than enough.   You should be using tags when you are trying to find a group of related articles which are not in the same category in your world. This can also be the case for your readers or players.   However, it makes sense to take some time to plan out your tags if you use them. It is easy to get lost or add tags with typos. The best way currently to maintain your tags is to use an interactive table, some kind of sheet, or your World Anvil Notebook.  

Creating Tags

A list of tags is always separated by a comma. In the shown interfaces the comma can be inserted with the ENTER key as well. Tags can be added to most other resources on World Anvil like Timelines, Historical Events, Maps and Images. This way they can be found with the same searches as the articles.

 

Conventions

Conventions are useful to make sure you can remember your tags and that they work properly in all situations. Keep in mind that these are not requirements.  
  • A common convention is to use a hashtag (#) prefix for all tags. But it is not necessary to do so. Just make sure to either always add a hash or never. However, when the tag is present it is always needed in any BBCode that require a tag as input like the [tagged], [taggedblock] and [diplomacy] BBCodes.
  • Do NOT use spaces within your tags.
  • Use a common writing convention:
    • CamelCase
    • hyphen-case
  • Avoid any special characters and diacritics.
  • Tags are case insensitive.
 

Using Tags

Tags can be used in several different ways. How you plan on using them will affect how you create them and apply them to your articles.  

List of Tagged Articles

However, the [tagged] BBCode offers an easy and flexible way to create a list of articles in your world. The syntax of the tag is:  
[tagged:TAG|TYPE|HEADER]
  This is how each parameter works:
  • TAG: this is the tag you want to list.
  • TYPE: use this to choose whether you want the list to be plain links or formatted article blocks. Type list for the former and block for the later.
  • HEADER: type the header of the list here. If you don't want to display any header, type none.
  For example, [tagged:water-spell|list|Water spell book] will generate a list of plain links with all articles tagged as #water-spell, and generate a h1 heading with the text Water spellbook.  
NOTE: Tags are matched to any tag that is the same or just contains the tag as long as it is an exact match. For example, the BBCode [tagged:train|block|Trains!] includes all articles with any of the following tags: #train, train-station, #trains and monorail-train.

User search

The search bar on the cover of each article can search tags in addition to titles. One search can always only match a single tag and the full search phrase must be present inside that tag. Don't search using the # prefix character.

Author Search

Any resources with a tag can be searched in the global search bar (Guild members only), in the Articles & Categories search bar and on the World Dashboard. This search works the same as the user search with additional functionality designed for the world author.

Diplomacy Web

Organizations can be displayed in a common diplomacy web using tags.
Guide to Diplomacy webs
Generic article | May 5, 2021

A diplomacy web is an interactive diagram that visually displays relationships between several organizations in your world

Special CSS Class

All tags are added as CSS classes to each article they are used on. The CSS class is prefixed with tag-. You can use this to apply a set of special layouts to specific articles. This does not work if the tag contains any spaces.
Guide to Categories
Generic article | Nov 2, 2022

Categories will help you organize your world!


FAQ

Is it possible to search an article with several tags?
No. You can only search for one specific tag. An article tagged with #humanoid and #dwarf will not show up if you search "humanoid dwarf".
Is it possible to use boolean logic to combine tags?
No. Every BBCode element which uses a tag as input can always only process a single tag.
 
The tagged & taggedblocks BBCode can at most return 150 articles.

Using tags with statblocks

You can also use tags with RPG blocks. While editing a block, go to the bottom of the page. There, you will find a Tags field that you can fill with your tags of choice. Then, you can use the [taggedblocks:TAG|TITLE] tag to create a list of blocks with that tag. For example, [taggedblocks:humanoid|Humanoid Creatures] will create a list of all blocks tagged as humanoid with a Humanoid Creatures header.   For more information on RPG blocks, read the guide to blocks:
Guide to Statblocks
Generic article | Oct 26, 2022

An explanation for what statblocks are and how they can be used.

Community Guides

Advanced uses of Tags
Generic article | Nov 24, 2022

How to use tags to add content to an article, or create an Index of articles


Comments

Please Login in order to comment!
27 Aug, 2020 09:54

Is it possible to generate a [tagged] list with multiple criteria tags?   e.g. I have deities tagged by divine rank and alignment. Could I create a tagged list to show me all Greater Deities that are Lawful Good?

27 Aug, 2020 10:25

I don't think that's possible with the current system. But feel free to add a feature request!

[they/them] Creator of Black Light, a science-fantasy universe.
6 Jan, 2021 02:13

I can't seem to search by tag using the methods described here. When I search for "#mytag" or by "

" (or any other arguments to "tagged"). I am able to search for tags without the "#" successfully. Am I missing something, or is this article wrong?

3 Mar, 2021 02:59

When searching, don't use the #. So, to search for the tag #ranger, enter ranger (without the #).

6 Jan, 2021 02:14

I'm also seeing that two letter tags don't work... Is there a minimum number of letters for a tag?

6 Jan, 2021 08:49

Yes. All searches on WorldAnvil have a three-letter minimum.

Check out my world World Behind the Veil!
Spectre0458
Comatose Spectre
5 Mar, 2021 16:48

how would i set up a hyperlink to another article within a article, would i just use HTMLs <a> code or something else?

5 Mar, 2021 20:17

We have a mention system, it works similar to Twitter mentions! Just type the character followed by the first characters of the article you want to link to and pick from the drop-down list that will appear. I recommend the guides to the mention system and bbcode commands . Hope this helps!

[they/them] Creator of Black Light, a science-fantasy universe.
6 Mar, 2021 18:47

And apparently I messed up my reply, I'm sorry! I meant the "at" character, the one used to mention people on Twitter.

[they/them] Creator of Black Light, a science-fantasy universe.
Spectre0458
Comatose Spectre
9 Mar, 2021 16:56

awesome, ty

31 Jul, 2021 13:16

Tags should work on journal entries for the user stream, no?   When I use the following in my articles, the list shows up correctly

  But in the journal entry, nothing comes up. Is there a different syntax there?

31 Jul, 2021 13:17

lol did not expect the tags to work here. Here it is sans braces: tagged:TAG|block|none

31 Jul, 2021 20:23

Tags are tied to a world, while the user stream is global. This means that if you call all articles with the tag "TAG", the system doesn't know which world you're talking about. I'm afraid this won't work in the user stream!   As for the BBCode in comments, yes, comments are fully BBCode-enabled! You can still type BBCode tags if you put them between [noparse] ... [/noparse] tags. For example, [noparse][tagged:TAG|block|none][/noparse] will display like this: [tagged:TAG|block|none]

[they/them] Creator of Black Light, a science-fantasy universe.
14 Sep, 2021 15:50

[tagged:#ingame_rule|block|UGGGG]   My tag is ingame_rule and I'm using above code in my article but it isn't pulling any of the articles with that tag. Any reason why?

16 Sep, 2021 20:56

Try it without the hashtag! The [tagged] tag looks for exactly what you type in it, so if your tag doesn't have a #, it won't show up. Let me know if this helps!

[they/them] Creator of Black Light, a science-fantasy universe.
18 Sep, 2021 01:05

Thanks Sage! That was it!

30 Nov, 2022 00:23

Is there anyway to specify an order to a tagged list?

30 Nov, 2022 09:35

No, there isn't currently.

[they/them] Creator of Black Light, a science-fantasy universe.
22 Apr, 2023 00:32

Is there a way to see a list of all of the tags you've used in your world?

24 Apr, 2023 08:54

Not at this point! But the tagging system will be upgraded in a future update, and this could be part of that.

[they/them] Creator of Black Light, a science-fantasy universe.
18 Jul, 2023 18:41

How do tags work with regard to who sees them? If, for example, I wanted to (for my own reference) create a tag for members of a secret society. Would readers viewing the individual characters be able to see that tag? Can readers click on a tag and see all articles tagged with it? Can individual tags be made public or private?

If at first you don't succeed, have a cup of tea and try again.   Creator of Relativity, a science-fantasy time-travel universe.
19 Jul, 2023 08:29

Hi! Yes, tags are public under the Metadata section of the article (this guide has tags, so you can see how it looks by yourself! Click on "Metadata" and look to the right). Tags don't have visibility controls at the moment, although you're welcome to open a feature suggestion!

[they/them] Creator of Black Light, a science-fantasy universe.