Upload
nimish-gupta
View
143
Download
0
Embed Size (px)
Citation preview
Anchor Tags
BY: NIMISH GUPTA
[ TECHNIBLOGIC.COM ]
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
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.
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.
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>
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.
QR CODE Generator – My Project
Via Qr-code.gq
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>
Features
The most popular technology to bridge the physical-digital gap
Encode any type of textual information in a QR Code
Limitations
A Qr-code Reader always needed a Application to decode it
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