See Also Suggest using the Html Embedded JavaScript extension for VSCode when allows you to have better intellisense in inline scripts in HTML.