HTML Links, Html a href

On this page, you will learn how to link to in-site or off-site pages in HTML.

Creating Links in HTML

A link or hyperlink is a link from one web resource to another. Links allow users to move smoothly from one page to another on any server, anywhere in the world. The link can be internal or external.

 The link starts from the source port and can be used for any web resource, such as an image, sound or video clip, PDF file, HTML document, or an item inside the document, etc. Triggers potential target connections.

Links are specified in HTML using the a tag.
<!-- A basic lik structure with the label '<a ........>' opens an inner link or a file path inside the href feature, and then the text image icon or similar items are used in the display area. '</a>' and closed .-->

<a href =" url "> Link text </a>

Everything between the opening <a> tag and the closing </a> tag becomes part of the link a user sees and clicks in a browser.

<a href="https://www.google.com/"> Google </a>
<a href="iletisim.php">
    <img src = "phone.jpg" alt = "contact">
</a>


<!-- You can set specific targets for links.-->

<a href="/hakkimizda.php" target="_top"> About Us </a>
<a href="https://www.google.com/" target="_blank"> Google </a>
<a href="https://www.google.com/" target="_parent"> Google </a>
<a href="https://www.google.com/" target="_self"> Google </a>


<!-- to create splash areas with a tag -->
<a href="#ilkparagraf"> Introduction </a>
<h2 id = "firstparagraph"> Login Text </h2>
<p> When the jump area is defined to h2, a jump point is created from the clicked item to h2 </p>

<!-- Create Download Link -->
<a href="downloads/test.zip"> Download the zip file </a>
The target property specifies how to open the linked document to the browser. There are four defined targets, and each target name starts with an underscore (_) character:

_blank - Opens the linked document in a new window or tab.
_parent - Opens the linked document in the top window.
_self- Opens the linked document in the same window or tab as the source document. This is the default value, so it is not necessary to explicitly specify this value.
_top - Opens the linked document in the full browser window.

Creating Bookmark Anchors
You can also create bookmark anchors to allow users to jump to a specific section of a web page. Bookmarks are especially useful if you have a very long web page.

Creating Download Links
You can also create the download link exactly the same as placing the text links. Just point the destination URL to the download file.
When the link is clicked, the download does not start, only the request is sent to the browser you use, and the request is accepted from a window that is opened and saved to the computer.
When using a href = "..." tag, it is not mandatory to use title = "title". Fakar provides great advantages for search engine optimization. The value you specify in the Title section matches the value of the search query on the internet.
E.Albayrak

0 Yorum

Soru & Yorum


Web Tasarım

Renkli Kare

Web Tasarım Ajansı