How do I customize the color of HTML attributes like class="", href="", src="", style="" etc. in Visual Studio Code?
Asked
Active
Viewed 1,047 times
7
-
https://marketplace.visualstudio.com/items?itemName=altrue.CustomColoring or https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-highlight – rioV8 Apr 11 '21 at 19:13
1 Answers
9
Open the settings.json
file and add this:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope":"entity.other.attribute-name",
"settings": {
"foreground": "#ca9829",
"fontStyle": "italic"
}
}
]
}
You can set the theme too to only apply with that one, not globally. Here is a know-how for all this.

Stefanie
- 467
- 1
- 7
- 17