Tags provide flexible categorization and organization for your notes beyond wikilinks and folders.
Add tags directly in note content:
# Machine Learning Fundamentals
This covers basic algorithms and applications.
#machine-learning #data-science #algorithms #beginner
Add tags in YAML front matter:
---
tags: [machine-learning, data-science, algorithms, beginner]
---
Create tag hierarchies using forward slashes:
#programming/languages/python
#programming/frameworks/react
#work/projects/website-redesign
#personal/health/exercise
Typing # shows existing tags. In front matter, use Ctrl+Space for tag suggestions.
Use the Tag Explorer panel in VS Code’s sidebar to:
Tags also appear in the [graph-view] with customizable colors.
Search for all occurrences of a tag across your workspace:
Results appear in VS Code’s search panel where you can navigate between matches.
Known limitation: this command leverages VS Code’s search capability, so it’s constrained by its use of regular expressions. The search is best-effort and some false search results might show up.
Customize tag appearance in markdown preview by adding CSS:
.foam/css/custom-tag-style.css.foam-tag class:
    .foam-tag {
  color: #ffffff;
  background-color: #000000;
}
.vscode/settings.json:
    {
  "markdown.styles": [".foam/css/custom-tag-style.css"]
}
Some users prefer [[book]] backlinks instead of #book tags for categorization. Both approaches work - choose what fits your workflow.