Search for:

File Path

A file path describes the location of a file in a web site’s directory structure.

~파일의 위치 지정

PathDescription
<img src=”picture.jpg”>The “picture.jpg” file is located in the same directory as the current page.
<img src=”images/picture.jpg”>The “picture.jpg” file is located in the images directory in the current directory.
<img src=”/images/picture.jpg”>The “picture.jpg” file is located in the images directory at the root of the current web.
<img src=”../picture.jpg”>The “picture.jpg” file is located in the same directory one level up from the current directory.

<img src=”/images/picture.jpg”>

The “picture.jpg” file is located in the images directory at the root of the current web.

<img src=”../picture.jpg”>

The “picture.jpg” file is located in the directory one level up from the current directory.

<img src=”./picture.jpg”>

The “picture.jpg” file is located in the same directory one level up from the current directory.

<img src=”images/picture.jpg”>

The “picture.jpg” file is located in the same directory one level up from the current directory.

<img src=”picture.jpg”>

The “picture.jpg” file is located in the same directory as the current page.

Best Practice

It is best practice to use relative file paths (if possible).

When using relative file paths, your web pages will not be bound to your current base URL. All links will work on your own computer (localhost) as well as on your current public domain and your future public domains.

(가능한 경우) 상대적인 파일 경로를 사용하는 것이 가장 좋습니다.

상대 파일 경로를 사용할 경우 웹 페이지가 현재 기본 URL에 바인딩되지 않습니다.

모든 링크는 사용자 컴퓨터(로컬 호스트)뿐만 아니라 현재 공용 도메인 및 향후 공용 도메인에서도 작동합니다.

https://www.w3schools.com/html/html_filepaths.asp

Leave A Comment

All fields marked with an asterisk (*) are required