CSS Id selectors not working but Class selectors are working

Hello! Quick question about CSS selectors. I can get the styling that I want as long as I am styling using CSS Class selectors, but if I try to do the same thing with ID selectors, none of my styling works. Any ideas why this is? I am using Sublime text if that helps at all…

Example:
This styling works as intended

<div class='content'>
     <h1>This is example text</h1>
</div>
<style> .content {color: purple;} </style> 

This styling does nothing whatsoever

<div id='content'>
     <h1>This is example text</h1>
</div>
<style> #content {color: purple;} </style>

If that is your exact code then you should know that the <style> element needs to be in the head to be properly embedded in the page.

you have to add some headers en attributes with the stack and javascript.