How to Create and Use Tags in Obsidian YAML

Add metadata of tags to Obsidian notes using YAML front matter

Amy Li

--

An thumbnail about Creating and Using Tags in Obsidian YAML
Image created by Amy Li using Canva.

In the previous article about creating and using metadata (aliases, tags, etc.) using Obsidian YAML, I talked about how to create a valid YAML and add metadata, especially tags to our obsidian notes. Regarding the tags, I also touched on the auto-completion feature. But I still feel the necessity to further explain them. So this article is fully dedicated to helping you create and use tags correctly using YAML.

Create Tags Metadata in YAML

We can easily create tags in YAML like the below:

---
tags: tag_name
---

multiple tags:

---
tags: tag_name1, tag_name2
---

or

---
tags: [tag_name1, tag_name2]
---

or

---
tags:
- tag_name1
- tag_name2
---

Use the Created Tags in YAML for Obsidian Notes

Suppose we already created some tags called content_video, and content_blog, then we could directly use them in other notes through YAML code.

---
tags:
- content_video
- content_blog
---

Leverage the Autocompletion of Tags in YAML

Enable the Autocompletion When Using Tags

After tags: , write a double quote with spacing between the left quote and the beginning value.

---
tags: " #content_video"
---

To write multiple tags with an autocompletion feature, coding like this

---
tags: " #content_video #content_blog "
---

or

---
tags: [" #content_video #content_blog "]
---

or

---
tags:
- " #content_video"
- " #content_blog "
---

Two Benefits of Using Autocompletion for Tags

--

--

Amy Li

Software Developer | Ph.D. in Medicine. I write about programming, productivity, personal development, and entrepreneurship. https://www.youtube.com/@amyjuanli