@James-Shanley: Welcome to the Notepad++ Community forum. You said:
I looked at the other file I have that runs properly I found it was saved as a .html file. I saved my other file as one and it worked
Good detective work, @James-Shanley ; I like it when new Community members are so helpful in their first post; it’s a refreshing change from “do everything for me” posts that we often see from new members.
There was a more-recent discussion about that in this other topic from a couple weeks ago (vs years ago for this topic), which came to the same conclusion. As a result, I opened the issue#5903 to request that more file types would allow View > View Current File In… Hopefully, that will make it into a future release.