AgerNic.com/ro
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL
Tutorial

O pagină web poate conține diverse link-uri care vă duc direct la alte pagini și chiar la anumite părți ale unei anumite pagini.
Aceste legături sunt cunoscute sub numele de hyperlink-uri.
Hiperlink-urile permit vizitatorilor să navigheze între site-urile Web făcând clic pe cuvinte, expresii și imagini. Astfel puteți crea hyperlinkuri folosind text sau imagini disponibile pe o pagină web.

Conectarea documentelor
O legătură este specificată folosind eticheta HTML <a>. Această etichetă se numește etichetă ancoră și orice dintre eticheta <a> de deschidere și eticheta de închidere devine parte a legăturii și un utilizator poate face clic pe acea parte pentru a ajunge la documentul legat </p> .

Sintaxa:
<a href="url">link text</a>

Exemplu:

<!DOCTYPE html>
<html> 
  <head> 
     <title>Cum sa adaugati link text?</title>
  </head>
<body>
<p>Click pe urmatorul link</p>
<a href = "https://www.agernic.com/ro" target = "_self">Curs online designer pagini web</a>
</body> </html>

HTML Atributul ținta (target)

În exemplul nostru anterior am folosit atributul target. Acest atribut este utilizat pentru a specifica locația unde s-a deschis documentul legat.

Următoarele opțiunile sunt posibile pentru target:
1. _blank --Deschide documentul legat într-o nouă fereastră sau filă.
2. _self --Deschide documentul legat în același cadru.
3. _parent --Deschide documentul legat în cadrul părinte.
4. _top --Deschide documentul legat în corpul complet al ferestrei.
5. targetframe --Deschide documentul legat într-un cadru denumit.

Exemplu 2:

<!DOCTYPE html>
<html> 
  <head> 
     <title>Opțiuni posibile pentru target HTML</title>
  </head>
<body>
<p>Click pe oricare dintre aceste linkuri</p>
<a href = "https://www.agernic.com/ro" target = "_blank">Web development -Opens in New</a> <br />
<a href = "https://www.agernic.com/ro" target = "_self">Webdesign incepatori -Opens in Self</a> <br />
<a href = "https://www.agernic.com/ro" target = "_parent">Cursuri web design online -Opens in Parent</a> <br />
<a href = "https://www.agernic.com/ro/html/text-links.php" target = "_top">programare incepatori -Opens in Body</a>
</body>
</html>

Setarea culoare ( color ) linkului HTML

Puteți seta culori linkurilor active și ale linkurilor vizitate folosind atributele: link, alink și vlink ale etichetelor <body>.

Exemplu 3:

<!DOCTYPE html>
<html> 
  <head> 
     <title>Hyperlink Exemple</title>
  </head>
<body alink = "#54A250" link = "#040404" vlink = "#F40633">
<p>Click pe oricare dintre aceste linkuri</p>
<a href = "https://www.agernic.com/ro" target = "_blank">Web development -Opens in New</a><br />
<a href = "https://www.agernic.com/ro" target = "_self">Webdesign incepatori -Opens in Self</a><br />
<a href = "https://www.agernic.com/ro" target = "_parent">Cursuri web design online -Opens in Parent</a><br />
<a href = "https://www.agernic.com/ro/html/text-links.php" target = "_top">programare incepatori -Opens in Body</a>
</body>
</html>
Tags: HTML text links, hyperlinks, exemple

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


analytics piwika