Presentation is loading. Please wait.

Presentation is loading. Please wait.

How files are organized

Similar presentations


Presentation on theme: "How files are organized"— Presentation transcript:

1 How files are organized
Files and Directories How files are organized

2

3 HTML files and paths How your code refers back to it’s content Relative vs. absolute Relative to the root or relative to the referring document <img src=“ /> <img src=“images/homer.jpg” /> <img src=“/monkeys.jpg” /> <img src=“/temp/homer.jpg” />

4 The “root” of a website Sometimes /web/ sometimes /
It is the beginning of the site and the directory holding the site. A link to /folder2/file1.html is a link relative to the root of the folder.

5 Same Directory <img src=“homer.jpg” />
Just the name of the file: <img src=“homer.jpg” />

6 Image in a folder in the same directory:
Just the name of the file: <img src=“images/homer.jpg” />

7 Image in a folder ABOVE the current directory:
Just the name of the file: <img src=“../homer.jpg” />

8 Absolute & Relative URLs
An absolute URL shows the entire path to the file, including the scheme, server name, the complete path, and the file name itself Like a street address A relative to the document URL points to the location of the desired file FROM THE FILE THAT CONTAINES THE URL. Instead of an address, Like saying “three doors down”, or “image xyz that is in the same directory as this file” When working within pages you can reference pages & items within the same directories. File name Absolute Relative to doc Index.html index.html Image.gif images/image.gif Data.html .../info/data.html


Download ppt "How files are organized"

Similar presentations


Ads by Google