Without linking, WWW can't exist. It is linking which reaches us from one place to other, which enables our transactions and processes. When anybody learns HTML, first they learn about giving a link to a text (the most popular, a href).
A element
It works like: <a href="www.example.com"> some text </a>
Link element
It is used between <head> </head> of a webpage, for example, to link a style-sheet. See example:
<link rel = "stylesheet" href = "style.css">
Area element
It is used to link a specific part of an image, see example:
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/01/Moscow_July_2011-16.jpg/220px-Moscow_July_2011-16.jpg" width="200" height="200" alt="Planets" usemap="#wow">
<map name="wow">
<area shape="rect" coords="0,0,50,50" href="http://example.com/">
<area shape="rect" coords="50,0,200,200" href="http://example.org/">
Link to indicate the part (fragment) of a document
Within a document Go Top or Top is possible by just a line of code, either by example 1 or example 2.
Example 1
<p> <a href="#top"> Top </a></p
Example 2
<p> <a href="#"> Top </a></p>
However if you like to target a particular heading within a document, you need to use "id." See below:
<h3 id="history">History</h3>
<p> <a href="#history"> Top </a></p>
Email link
To create email link just use "mailto:" in the href, see below example:
<a href="mailto:no-reply@example.com">Contact</a>
Creating a phone link
Use "tel:+" along with mobile number. If your MacBook is connected with your iPhone, it would be easy to call. Change the mobile number with your friend's, see in browser and start calling.
<a href="tel:+0000000000">call to agent</a>
Comments
Post a Comment