1👍
✅
It depends on which elements you want apply a style.
In the first example you applied font color style to ALL h2 elements. You can also add "scoped" attribute to a block to prevent leaking styles to other components.
In the second – ONLY to the element that has inline style.
Source:stackexchange.com