12
Anchor Tags BY: NIMISH GUPTA [ TECHNIBLOGIC.COM ]

Anchor tag HTML Presentation

Embed Size (px)

Citation preview

Page 1: Anchor tag HTML Presentation

Anchor Tags

BY: NIMISH GUPTA

[ TECHNIBLOGIC.COM ]

Page 2: Anchor tag HTML Presentation

Introduction

The <a> tag defines a hyperlink, which is used to link from one page to

another.

The most important attribute of the <a> element is the href attribute,

which indicates the link's destination.

By default, links will appear as follows in all browsers:

An unvisited link is underlined and blue

A visited link is underlined and purple

An active link is underlined and red

Page 3: Anchor tag HTML Presentation

Internal Linking

To create a link with in that page, add a name attribute to the anchor tag

and specify that name from the place where you want that navigation

<a name="chapter1">Some contents</a>

Click <a href="#chapter1">here</a> to read chapter 1.

Page 4: Anchor tag HTML Presentation

Linking to Email

<a href="mailto:[email protected]">Email Me</a>

This will appear in the page as

Email Me

When we click that, we can compose mail and send it to that

address.

We can even configure subject and body of the mail using the

attributes subject and body.

Page 5: Anchor tag HTML Presentation

Opening a Link in a New Browser Tab

The target attribute on the anchor element opens a link in a new browser

tab.

<a href="http://yahoo.com" target="_blank">Yahoo!</a>

Page 6: Anchor tag HTML Presentation

Anchor Tag - Attributes

Download : Specifies that the target will be downloaded when a user

clicks on the hyperlink

Href : Specifies the URL of the page the link goes to

Target : Specifies where to open the linked document

Title : Adds a title to an element. Many browsers will display the value of

this attribute when the element is hovered-over or is in focus.

Rel : The rel attribute specifies the relationship between the current

document and the linked document.

Page 7: Anchor tag HTML Presentation

QR CODE Generator – My Project

Via Qr-code.gq

Page 8: Anchor tag HTML Presentation

Main code

<input type="url" name="url" id='url' placeholder="Enter the url...."/><input type="button" id='btn' onClick="qrcode()" value="Go">

</form>

<p id="display"></p></center>

<script>

function qrcode(){

var url=document.getElementById('url').value;

document.getElementById('display').innerHTML=

'<img

src="http://chart.apis.google.com/chart?cht=qr&chs=200x200&chl='+url+'"></img>';

}

</script>

Page 9: Anchor tag HTML Presentation

Features

The most popular technology to bridge the physical-digital gap

Encode any type of textual information in a QR Code

Page 10: Anchor tag HTML Presentation

Limitations

A Qr-code Reader always needed a Application to decode it

Page 11: Anchor tag HTML Presentation

Future scope

In Future it can have many the feature to store the address, phone book,

telephone number etc. other than URL

We can also Encrypt Password and communicate between to devices

Page 12: Anchor tag HTML Presentation