Referencing CSS and JS file in Github Pages?

The html is appearing here:
https://coding24765.github.io/mymusicgadget/

How would I get the CSS and Javascript to appear also?
https://github.com/coding24765/mymusicgadget

I’ve never used git hub, or git hub pages before.

There’s a way to do it, I don’t know how it’s done though.

There is a way to do it, right?

Do you mean create a HTML Github web page with CSS and JavaScript links to the source page?

Right now only the html loads, I want the css and javascript to load inside the page.

That’s what I’m trying to do.

The html keeps loading by itself.
https://coding24765.github.io/mymusicgadget/

View the web page source code that I supplied and. take a note of the CSS paths which were used.

I’m not seeing any path to css or script files

<!DOCTYPE html>
<html>
<head>
  <title>My Music Page</title>
</head>
<body>
  <div class="outer">
...
2 Likes

Am I putting the css and javascript inside here?
index.html

Whoops.

I just checked using my tablet and noticed all the CSS is embedded :frowning:

It was a long time ago that I created the web page and I have forgotten how I managed to get the page to render correctly.

https://validator.w3.org/nu/?doc=https%3A%2F%2Fjohn-betong.github.io%2Fhello-world%2F&showsource=yes&showoutline=yes

Fixed:
https://coding24765.github.io/mymusicgadget/

Thank you guys for helping me figure this out.

1 Like

Try removing the following html errors and warnings:

https://validator.w3.org/nu/?doc=https%3A%2F%2Fcoding24765.github.io%2Fmymusicgadget%2F

See my Simple Samples Simple Sample Website. That is a one-page GitHub site. Except it does link to a StyleSheet.css. I did have problems figuring out how to get a GitHub site to work but once I figured it out it was easy. I forget what it was that was a problem but I think I wrote that page to explain it. So have a look at that.

Also Cloud Application Platform | Heroku works with GitHub, which means if you understand Git and GitHub (I am a beginner) then it is a good host; you can do more than what you can in your GitHub site. Heroku works very well with Visual Studio. See my tiny Heroku site at First Heroku Site.

Are you coding24765? If so then apparently you have not public repositories. Probably you must at least make your web application project public.

I think the problem I had was the repository and/or project name for the website project. I suggest making an index.html file as the home page and getting that working first. You should then be able to see the home page at coding24765.github.io. My GitHub site project is at SimpleSamples/simplesamples.github.io: This is my GitHub Pages site..

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.