Skip to content
Discussion options

You must be logged in to vote

Hi Klaudiablo,

Using a raw.githubusercontent.com file as a link to your CSS is not recommended, as the raw mode serves files with the Content-Type: text/plain header, which means that neither HTML, CSS, nor JS can be used directly in web pages.

To link a CSS file hosted on GitHub to an HTML file, you can use a relative or absolute path. If the CSS file is in the same repository as the HTML file, you can use a relative path, as demonstrated by the code snippet below:

<link href="./style.css" type="text/css" rel="stylesheet">

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
6 replies
@mattbuttondev
Comment options

@klaudiablo
Comment options

@bullishguate
Comment options

@rachelferguson204-oss
Comment options

@rachelferguson204-oss
Comment options

Answer selected by klaudiablo
Comment options

You must be logged in to vote
1 reply
@rachelferguson204-oss
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pages Host a static website, right from your repo Question Ask and answer questions about GitHub features and usage
5 participants