I am including a class name in some of the HTML tags, but not necessarily going to use them later, if I am not using them in my CSS file, VS Code will show me this warning:
CSS class selector 'nav-links' not found
(assuming I gave the class name as nav-links
)
for example, if I write the below code:
<div class='hero-introduction'>
<h2>
Elena Joy <br />
Photographer
</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cumque molestiae dolores cum debitis
corporis. At enim aut atque maiores omnis.
</p>
<a href='.gallery'>Gallery</a>
</div>
then I am getting this warning:
CSS class selector 'hero-introduction' not found
if I add this class to my CSS file then there is no error to be seen. Is it necessary to add all the class names initialized in my HTML file in the style.css file?
I am using the "HTML CSS Support" extension in Visual Studio Code.