Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Markdown AttrsNew to Visual Studio Code? Get it now.
Markdown Attrs

Markdown Attrs

saeris

|
105 installs
| (0) | Free
Adds curly-brace attribute syntax to VSCode's markdown preview
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Markdown Attrs

Adds curly-brace attribute syntax to VSCode's markdown preview.

Overview

The attrs plugin lets you attach HTML attributes (classes, IDs, data attributes, etc.) to almost any Markdown element using {...} syntax. It supports headings, paragraphs, code fences, inline elements, lists, tables, and horizontal rules.

<h2 id="my-section" class="highlight">My Section</h2>

Syntax

Attributes are written in curly braces using CSS-like shorthand:

  • #id → sets id
  • .class → adds a class
  • key=value → sets any attribute

Headings

## My Section {#my-section .highlight}

Code fences

```ts {.language-typescript data-filename="example.ts"}
const x = 1;
```

Paragraphs

A paragraph with a custom class.
{.note}

Inline elements

This is **important**{.warning} text.

After lists and tables

- Item one
- Item two
  {.checklist}

About

Part of Markdown Preview Extended Syntax — a pack of Markdown preview syntax extensions you can install all at once.

Powered by @mirrordown/mdit-attrs · Source on GitHub.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft