LoginSignup
2
2

More than 1 year has passed since last update.

【超重要!!】GitHubから外部参照する方法

Last updated at Posted at 2019-10-05

1.GitHubから外部参照する方法

01.png

画像のリンクはこちら

  1. 参照したいGitHubのサイトへアクセスする。
  2. 上記の画像を参照し、URLを https://①.github.io/②/③ とすると参照できる。

2.外部参照の確認

test.html
<!DOCTYPE html>
<html>
    <head>
        <!-- 付加情報 -->

        <!-- タイトル -->
        <title>タイトル名</title>
        <!-- 文字コード -->
        <meta charset="utf-8" />
        <!-- 外部ファイル -->
        <link type="text/css" rel="stylesheet" href="https://ryomeblog.github.io/CSS_Test/style.css">
    </head>

    <body>
        <!-- コンテンツ -->
        <h1>Hello</h1>
    </body>
</html>

上記はGitHubから CSSを外部参照 したhtmlの具体的な記述例です。
中身の文をコピーして、文字コードは UTF-8 を指定し、ファイル名を test.html でデスクトップに保存するとブラウザではこうなります↓↓

02.png

画像のようになれば成功です。

3.GitHub

GitHubにソースコードを公開しています。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2