HTML ye Giriş
Home Temel HTML Text Link Image List Table Color Frames Forms
 
.
CGI scripts
.
System
.
Java
 
© Timur Karaçay
tkaracay@baskent.edu.tr
Başkent Üniversitesi, Ankara, TR
 

 

Index Hyper Text Link

Bir web sayfasındaki hyper text link, ya aynı sayfada önceden belirlenmiş bir bölüme ya da başka bir URL adresine gidişi sağlar. Aynı sayfada bir yere gidebilmesi için, o yerin önceden işaretlenmiş olması gerekir. İşaretleme işlemi iki yöntemle yapılabilir:

Örnek:

Görüntü HTML Dökümanı (Program)
İşaretciyi_çağrıştıran_deyim <A NAME="işaretcinin_adi"> İşaretciyi_çağrıştıran_deyim </A>

Not:
Anchor noktasını belirleyen işaretciyi çağrıştıran deyim konmayabilir.

Web sayfasının herhangi bir yerinden, önceden işaret edilen bir yere sıçramak için ANCHOR damgasının HREF parametresi kullanılır.

Örnek:

Görüntü HTML Dökümanı (Program)
İşaretciyi_çağrıştıran_deyim <A HREF="#işaretcinin_adi"> İşaretciyi_çağrıştıran_deyim </A>

İşaretcinin_adı'nın önündeki # simgesi gereklidir. Çünkü bu simge, tarayıcıya, NAME ile işaretlenmiş bir noktaya sıçraması gerektiği bildirir.

Başka Dökümana Bağlanma

İşaret edilen döküman aynı makinada ise, href değeri onun göreceli adresi verilebilir. İşaret edilen döküman başka bir makinada ise, dökümanın tam URL adresi yazılmalıdır.
Örnek:

Aynı makinadaki döküman
../yol/dosya.html
Başka makinadaki
"url" dökümanın URL adresi
<A HREF="file.html"> Name </A> <A HREF="http://sunucu/dosya.html"> Name </A>

NAME ile işaretlenmiş bir bölgeye sıçramak için;

Hyper text link to the file
file.html at point mark
Hyper text link to the file
file.html at point mark held on another machine using an URL
<A HREF="file.html#mark"> Name </A> <A HREF="http://host/file.html#mark"> Name </A>

Try it

 

Index URL (Uniform Resource Locator)

The URL is used to specify the location of a file held on a remote machine. This is composed of several distinct components. For example, the URL http://host/file.html is composed of the following components.

http
The protocol that is to be used to access the file. In this case the HyperText Transfer Protocol. There are other protocols, but they are used infrequently.
host
The name of the machine, this can be either a symbol name such as puck.it.brighton.ac.uk or a numeric IP (Internet Protocol) address such as 193.200.1.1.
file.html
The path name of the file to which the hypertext link is to be made. This is relative to the base directory in which web pages are held. The location of this directory htdocs is defined by the person who has set up the web server.

Unix based web servers allow a convenient shortcut to accessing files placed in the directory public_html in the user's home directory. For example, the file home.html placed in the directory public_html in mas's home directory on the server machine puck.it.brighton.ac.uk, can be accessed with the URL http://www.it.brighton.ac.uk/~mas/home.html

In creating the URL the characters space, =, +, <, >, %, ", /, and ? should not be used. If you do need to include these characters then represent them by the % symbol followed by the hexadecimal value of the character. The space character however, can also be represented by the character +. For example, http://www.it.brighton.ac.uk/%25.html represents the URL http://www.it.brighton.ac.uk/%.html.

Other access protocols can be specified by an URL. For example, to access files via the FTP (File Transfer Protocol) an URL of the form:

ftp://ftp.brighton.ac.uk/pub/mas/ada95

is used. This specifies that a link to the file/directory mas/ada95 on the machine ftp.brighton.ac.uk should be made. If mas/ada95 is a directory the viewer is presented with a list of files in the directory, otherwise the file will be displayed/transferred to you.

The full specification for an URL is:

Protocol Format Notes
HTTP http://host[:port]/path -
FTP ftp://[username[:password]@host/path If no username is specified the user anonymous is used.
Gopher gopher://host[:port]/[type[item]] -

Note:
In describing the format of an URL items enclosed in [ ]'s are optional.