0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【開発基礎】ファイルパスの記述方法

Posted at

ファイルパス

root
- index.html
- about.html
- mail.html
.
.

 images
 - title.png
 - photo.jpg
 .
 .

 css
 - style.css
 .
 .

 scripts
 - jquery.js
 .
 .

同じ階層にあるファイルを指定する記述方法
(例:index.htmlからabout.htmlをリンクする場合)

index.html
<a href="about.html">リンク<a>

1つ下の階層にあるファイルを指定する記述方法
(例:index.htmlからtitle.pngを参照する場合)

index.html
images/title.png

root階層にあるファイルを指定する記述方法
(例:jquery.jsからindex.htmlを参照する場合)

jquery.js
../index.html

1つ上の階層にあるファイルを指定する記述方法
(例:jquery.jsからtitle.pngを参照する場合)

jquery.js
../images/title.png
0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?