I uploaded two files to Github pages: an HTML file and CSS file. When I click on link provided for github pages it only applies HTML. Not CSS file, even though the HMTL and CSS files will apply to local host.
!doctype html>
<html>
<head>
<H1>Hello world!</H1>
<link rel="stylesheet" href="styles.css">
</head>
do I have to refer to link CSS and HTML in a different way in order to apply to github pages? also, there is no file that styles.css is in. And both HTML and CSS files were uploaded not pushed.
CodePudding user response:
Try changing the path to the css file like:- /styles.css
Also at the top it should be <!DOCTYPE html>
instead of !doctype html>
CodePudding user response:
I would recommend using the GitHub Desktop App to access your files and see if that works.
Here is a tutorial on how to use the desktop app if you have not used it before: https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/overview/getting-started-with-github-desktop