Eternal css stylesheets

Hi
I tried making a external css stylesheet (https://nathanshosting.github.io/GreenTemplate/) in Github but when I tried to open it it doesn’t work it comes up with 404 error, can you please help.
It doesn’t work in a html repositories ether.

It looks like that CSS file is online at the direct link here:

https://nathanshosting.github.io/GreenTemplate/stylesheet.css

Are you still not able to see it? If so, can you try clearing your browser’s cache?

Just as a quick note, GitHub and GitHub Pages aren’t intended for use as a CDN for files used in other external applications or websites and using GitHub as a CDN for content intended for external use is against the terms of service. If you’re serving this CSS file for use in an externally hosted site or app then I’d recommend packaging this file with the app or hosting it along with the other files from your site.

However, if you’re planning to add some HTML content to this repository, or use it as a stylesheet for another site hosted on GitHub Pages, then you should be good to go!

Ok thanks i can see it now.
I am new to coding and the second part of the message is confusing me slightly. So if I am using Visual Studio code to write my code i can’t use the style sheet in it? my end product is to use the style sheet for some html code that i hosted on github is that ok? thanks so much I could not figure it out because when i want to the settings and tryed to open it it come up as (https://nathanshosting.github.io/GreenTemplate/) not (https://nathanshosting.github.io/GreenTemplate/stylesheet.css) so did i do some thing wrong or what. thanks so so much.

You can write your code in Visual Studio, yes!

However, if you’re using that stylesheet in an external application, for example if you’re building a Visual Studio Code theme and are loading that stylesheet as the source of the theme’s styles using the github.io URL, that would be using Pages as a CDN.

when i want to the settings and tryed to open it it come up as (https://nathanshosting.github.io/GreenTemplate/) not (https://nathanshosting.github.io/GreenTemplate/stylesheet.css) so did i do some thing wrong or what.

This is the correct URL for your site, but because you haven’t included an index.html file in your repository your browser doesn’t have any HTML to render when you visit that page. Browsers don’t load CSS files directly, they need an HTML file, so this file won’t be visible unless you visit the direct link.

Ok thanks so much.
So just to make this clear for me I won’t use the Stylesheet in Visual Studio Code that I hosted on github.
And in future when making .css files do I just add /stylesheet.css/ To the URL? Thanks again for your help