Skip to content
  • Quizes
  • QStack
  • Blog
  • pinterest
  • instagram
  • twitter
  • linkedin
  • facebook
W3 Coding Schools
  • Home
  • HTML
    • HTML Introduction
    • HTML Editors
    • Fundamentals of HTML
    • Elements of HTML
    • HTML Attributes
    • HTML Headings
    • HTML Paragraphs
    • HTML Style Attribute
    • HTML Text Formatting
    • HTML Phrase Tags
    • HTML Comments
    • HTML with CSS
    • HTML Links
    • HTML Images
    • HTML Tables
    • HTML Lists
    • HTML Blocks
    • HTML Class Attribute
    • HTML Id Attribute
    • HTML Iframes
    • HTML JavaScript
    • HTML File Paths
    • HTML Head
    • Computer Code Elements
    • HTML Entities
    • HTML Charset
    • HTML URL Encode
    • HTML and XHTML
    • HTML Layouts
    • HTML Forms
    • HTML Form Elements
    • HTML Form Input Types
    • HTML Input Attributes
    • HTML5 Introduction
    • HTML5 New Elements
    • Semantic Elements
    • HTML5 Migration
    • Style Guide
    • HTML Canvas
  • CSS
    • CSS Introduction
    • CSS Syntax and CSS Comments
    • CSS Selectors
    • How to add CSS to a Webpage
    • CSS Color Basics
    • CSS Background Properties
    • CSS Border Properties
    • CSS Margin and Padding Properties
    • CSS Height and Width properties
    • CSS Box Model
    • CSS Outline Properties
    • CSS Fonts
    • CSS Text
    • How To Add Icons
    • CSS Links
    • CSS List-Style
    • CSS Tables
    • CSS Display Property
    • CSS Position Property
    • CSS Overflow Property
    • CSS max-width Property
    • CSS Float and Clear Properties
    • CSS Alignment
    • CSS inline-block
    • CSS Combinators
    • CSS Pseudo Classes
    • CSS Pseudo Elements
    • CSS Opacity
    • CSS Navigation Bar
    • CSS Dropdowns
    • CSS Image Gallery
    • CSS Image Sprites
    • CSS Attribute Selector
    • CSS Styling Forms
    • CSS Counters
    • CSS Units
    • CSS Specificity
    • CSS Website Layout
    • CSS Rounded Corners
    • CSS Border Image Property
    • CSS Multiple Backgrounds
    • CSS Gradient
    • CSS Shadow Effects
    • CSS Text Effects
    • CSS Web Fonts
    • CSS 2D Transforms
  • Bootstrap 4
    • Bootstrap 4 – Introduction
    • Bootstrap versions
    • Bootstrap 4 Layout
    • Bootstrap 3 Vs Bootstrap 4
    • Bootstrap 4 Grid System
    • Bootstrap 4 Typography
    • Bootstrap 4 Colors
    • Bootstrap 4 Images
    • Bootstrap 4 Tables
    • Bootstrap 4 Jumbotron
    • Bootstrap 4 Figures
    • Bootstrap 4 Alerts
    • Bootstrap 4 Buttons
    • Bootstrap 4 Button Group
    • Bootstrap 4 Badges
    • Bootstrap 4 Spinners
    • Bootstrap 4 Progress Bars
    • Bootstrap 4 Pagination
    • Bootstrap 4 Breadcrumbs
    • Bootstrap 4 List Groups
    • Bootstrap 4 Cards
  • jQuery
    • jQuery Introduction
    • jQuery Download
    • jQuery Selectors
    • jQuery Event Methods
    • jQuery Hide/Show Effects
    • jQuery Fading Effects
    • jQuery Sliding Effects
    • jQuery Animation
    • jQuery Stop and Callback
    • jQuery Get and Set Methods
    • jQuery Chaining
    • jQuery Add
    • jQuery Remove
    • jQuery CSS Classes
    • jQuery Style Properties
    • jQuery Dimensions
    • jQuery Traversing
    • jQuery Ancestors
    • jQuery Descendants
    • jQuery Siblings
  • Javascript
    • JS Introduction
    • JS Where to Put
    • JavaScript Syntax
    • JavaScript Comments
    • JavaScript Variables
    • JavaScript Data Types
    • JavaScript Operators
    • JavaScript Events
    • JavaScript Strings
    • JavaScript Numbers
  • php
    • PHP Introduction
    • Install PHP
    • PHP Syntax and Comments
    • PHP Variables
    • PHP Constants
    • PHP Echo and Print
    • PHP Data Types
    • PHP Strings
    • PHP Operators
    • PHP $ and $$ Variables
  • WordPress
    • WordPress Introduction
    • WordPress History
    • WordPress.com vs WordPress.org
    • How to Install WordPress
    • WordPress Dashboard
    • How to Create a WordPress Website
    • WordPress Posts
    • WordPress Pages
    • WordPress Posts vs Pages
    • WordPress Categories
  • SEO
    • SEO Introduction
    • SEO Tactics and Methods
    • SEO Relevant Filenames
    • SEO Domain Name
    • Website Design and SEO
    • SEO Keywords
    • Meta Tags Optimization
    • Title Tag Optimization
    • Anchor Text Optimization
    • Content Optimization
  • Android
    • Android Introduction
    • Android History and Versions
    • Android Architecture
    • Android Environment Setup
    • Android Application Components
    • Hello World Application
    • Android Activities
  • iOS
    • iOS Introduction
    • iOS Environment Setup
    • iOS Architecture

You Are Here

  • Home
  • Learn HTML
  • HTML Links

Topics

  • HTML Introduction
  • HTML Editors
  • Fundamentals of HTML
  • HTML Elements
  • HTML Attributes
  • HTML Headings
  • HTML Paragraphs
  • HTML Style Attribute
  • HTML Text Formatting
  • HTML Phrase Tags
  • HTML Comments
  • HTML with CSS
  • HTML Links
  • HTML Images
  • HTML Tables
  • HTML Lists
  • HTML Blocks
  • HTML Class Attribute
  • Id Attribute for HTML
  • HTML Iframes
  • HTML JavaScript
  • HTML File Paths
  • HTML Head
  • HTML Computer Code Elements
  • HTML Entities
  • HTML Charset
  • HTML URL Encode
  • HTML and XHTML
  • HTML Layouts
  • HTML Forms
  • HTML Form Elements
  • HTML Form Input Types
  • HTML Input Attributes
  • HTML5 Introduction
  • HTML5 New Elements
  • Semantic Elements in HTML5
  • HTML5 Migration
  • Style Guide
  • HTML Canvas
  • HTML SVG

Oct Champs & Prizes

  • 1. Pooja Ladda
  • 2. Manjali Kuldharan
  • 3. Pranali Surawar
  • 4. Anjali Kulkarni
  • 5. Vishal Deshmukh

Recent Posts

  • HTML Media
  • jQuery Siblings
  • Bootstrap 4 Cards
  • jQuery Descendants
  • jQuery Ancestors

HTML Links

HTML link tag is used to apply link to a word, a sentence or image. A webpage can contain different types of links that take you directly to other pages and allow you to navigate to a specific location.
In HTML links are called Hyperlinks and they are defined using <a> tag.

HTML Link Syntax:

In HTML Links are specified using the <a> tag, which is called an anchor tag. The content between <a>…</a> becomes part of the link and the user can click on that part to reach the specified location.

Syntax:

<a href = “URL”> Link Text/Sentence/Image </a>

Explanation of the syntax:

href : The href attribute specifies the destination address of the link used.
Link Text: It is the visible part of the link.

Example:

<a href = “https://flourishsoft.com/”> Flourish Software </a>
Try it

Internal Links:

An “Internal Link” is a link in your site that navigates you to another page on your website.

Example:

<a href = “http://www.w3codingschools.com/html-tutorial-html-introduction/”> W3CodingSchools </a>
Try it

External Links:

The “External Link” is a link that navigates you away from your site to another website (like http://google.com.

Example:

<a href = “https://flourishsoft.com/”> Flourish Software </a>
Try it

HTML Link Colors:

Different links will appear in different formats such as:
An unvisited link appears as underlined and blue in color by default.
A visited link appears as underlined and purple in color by default.
An active link appears as underlined and red in color by default.

Example :

You can change the appearance of links by using CSS:
a:visited {

color: green;

background-color: transparent;

}
a:hover {

color: blue;

background-color: transparent;

}
a:active {

color: yellow;

background-color: transparent;

}
a:focus {

color: red;

background-color: transparent;

}
Try it

The target Attribute in HTML Link Tag:

The target attribute specifies the location where to open the linked document.

The target attribute values:

  • _blank: It opens the linked document in a new window
  • _self: It opens the linked document in the same frame/window
  • _parent: It opens the linked document in the parent frameset
  • _top: It opens the linked document in the full body of the window
  • framename: It opens the linked document in the named frame

Example:

<p> This attribute will open link in a new browser window or tab. </p>
<a href=”https://flourishsoft.com/” target=”_blank”> Flourish Software </a>
<p> This attribute will open link in the same window or tab. </p>
<a href=”https://flourishsoft.com/” target=”_self”> Flourish Software </a>
<p>This attribute will open link in the full body of the window. </p>
<a href=”https://flourishsoft.com/” target=”_top”> Flourish Software </a>
<p> This attribute will open link in the parent frame. </p>
<a href=”https://flourishsoft.com/” target=”_parent”> Flourish Software </a>
Try it

HTML Image as Link:

You can create a hypertext link using an image, it’s simple to use an image as a hyperlink. You just need to use an image inside the hyperlink at the place of text.

Example:

<p>Click following link</p>
<a href = “https://flourishsoft.com/” target = “_self”>
<img src = “image.jpg” alt = “flourish website”>
</a>
Try it

Link Title Attribute:

The title attribute in HTML link gives extra information about an element and this information is shown as a tooltip when the mouse moves over it.

Example:

<a href=”https://flourishsoft.com/about” title=”Go to About section”> Flourish Software </a>
Try it

HTML Bookmark:

HTML Bookmark is useful if you have a long page that you want to allow the users to quickly navigate to different sections on the same web page.

Steps to create Bookmark:

Create a bookmark, using the id attribute.
<h3 id=”T5″> Topic 5 </h3>
Add the specified link of the webpage to the bookmark within the same page.

Example:

<a href=”#T5″> Jump to Topic 5 </a>
Try it

Download Links:

You can create a download link that is used to download a file from the server.
Creating a downloadable link is very simple you just need to give the URL of the file.

Example:

<a href = “http://w3codingschools.com/sample.pdf” download> Download PDF File </a>
Try it

Post navigation

HTML with CSS
HTML Images

Ask a Question Cancel reply

Your email address will not be published. Required fields are marked *

W3 CODING SCHOOLS © Copyright 2019-20
Privacy policy   Terms of use

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok