Lesson n°2: Organization of folders, Hypertext links, Insertion of pictures
 
 

Organization of folders:

Begin by creating a new folder in which you want to work. It is this space recently created that you will transfer on your server.

Do not make any link with a picture or a file outside this folder, it will work on your computer but not on Internet!

It is advised to separate the pictures of texts. Create for that purpose appropriate folder.

The arborescence can be the following one:

 
Folder : website
  • index.html
Folder : doc_text Folder : doc_img
  • text1.html 
  • text2.html 
  • text3.html 
  • text4.html
  • img1.jpg 
  • img2.jpg 
  • img3.jpg 
  • img4.jpg

 

Notice: Note the presence of index.html. This document is essential. It is the front door of your website. The browser will open this document at first. It must be placed at the root of the mainfolder.

Let us admit that your website is transfered on a server at the following address: "http: // www.website.com"
When a visitor type this address "http: // www.website.com", the document "index.html" will be opened, it would be the same address then "http: // www.website.com / index.html"

It is however possible to go directly to a precise page of a website : "http: // www.website.com / doc_text / text4.html"

It is also possible to place a document "index.htm" in a secondary file
This is very useful if your site has several parts well distinguished, for example a website in several languages:
"http: //www.website.com /deutch" and "http: //www.website.com /english"
 
 


Hypertext links, mail and insertions of pictures:

Before approaching hypertext links and insertions of pictures, it is necessary for us to speak about the address of the document
The address can be relative or absolute.

You noted the use of the slash "/" which means going down in the arborescence. With two points " ../ " the function is going back up in the folder tree.

absolute Address:

relative Address:

Depends on the situation of the document in wich you are working
Let us take examples from our site website.com

 
Point of departure: Point of arrival: address :
text1.html text2.html text2.html
index.html text2.html doc_text/text2.html
text2.html index.html ../index.html
text2.html img1.jpg .. /img/img1.jpg

Hypertext link:

< a href = " http: // www.website.com / text / text4.html " > Click here to reach the text 4 < / a > for an absolute address
<a href = " texte4.html " > Click here to reach the text 4 < / a > for a relative address
("a" means anchor)
Link mail:
< a href = " mailto:name@website.com" > My mailbox< / a >


Insertion of a picture:

< img src = " http: // www.website.com / img / img1.jpg " >for an absolute address.
< img src =.. / img / img1.jpg >for a relative address.
Exercise:
Elaborate a project of simple website with some html documents and some photos, create architecture on paper then make realization on your computer.
 
 

Lesson 3-Contents