LoginSignup
0
1

More than 3 years have passed since last update.

HTMLの雛形

Posted at

・testAppフォルダの作成(その他必要なファイルも作る。画像参照。)
 <フォルダの階層>
  testApp
   /index.html(topページ)
   /css(スタイルシートのフォルダ)/style.css
   /js(javascriptが入るフォルダ)/test.js
   /images(画像が入るフォルダ)/img1.jpg

スクリーンショット 2019-11-19 20.12.01.png

<!DOCTYPE html>
<html lang="ja">
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet"  href="css/style.css">
    <title>タイトル</title>
    <script src="js/test.js"></script>
  </head>
    <body>
      <main>
        <p>Hello World</p>
      </main>
  </body>
</html>
css/style.css
p{
  font-size: 30px;
  color: red;
}
js/test.js
window.onload = function() {
  console.log("読み込み完了!")
}

・index.htmlをダブルクリック→「Hello World」が表示されれば読み込み完了。
・読み込んだ際文字が赤ければCSSの読み込み完了。
・ブラウザを「右クリック」→「検証」→「console」→「読み込み完了!」が表示されればJSファイルも問題なし。
 
スクリーンショット 2019-11-19 20.24.15.png

0
1
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
0
1