LINKS (+ FORMATTING)
HTML Links - Hyperlinks-
HTML links are hyperlinks.
You can click on a link and jump to another document.
When you move the mouse over a link, the mouse arrow will turn into a little hand.
HTML Links - Syntax-
In HTML, links are defined with the <a> tag.
EXAMPLE
<a href="url">link text</a>
HTML Link Colors-
By default, a link will appear like this (in all browsers):
- An unvisited link is underlined and blue
- A visited link is underlined and purple
- An active link is underlined and red.
EXAMPLE
<style>
a:link {
color: green;
background-color: transparent;
text-decoration: none;}
a:visited {
color: pink;
background-color: transparent;
text-decoration: none;}
a:hover {
color: red;
background-color: transparent;
text-decoration: underline;}
a:active {
color: yellow;
background-color: transparent;
text-decoration: underline;}
</style>
color: green;
background-color: transparent;
text-decoration: none;}
a:visited {
color: pink;
background-color: transparent;
text-decoration: none;}
a:hover {
color: red;
background-color: transparent;
text-decoration: underline;}
a:active {
color: yellow;
background-color: transparent;
text-decoration: underline;}
</style>
HTML Links - ATTRIBUTES OF TARGET
The target attribute specifies where to open the linked document.
The target attribute can have one of the following values:
- _blank - Opens the linked document in a new window or tab
- _self - Opens the linked document in the same window/tab as it was clicked (this is default)
- _parent - Opens the linked document in the parent frame
- _top - Opens the linked document in the full body of the window
- framename - Opens the linked document in a named frame
<a href="https://www.furthergrow.in/" target="_blank">Visit Further grow!</a>
HTML Links - Image as Link-
It is common to use images as links:
<a href="default.asp">
<img src="smiley.gif" alt="HTML tutorial"style="width:42px;height:42px;border:0;">
</a>
<a href=""> ... </a>
Anchor text for hyperlink.
<a href="mailto:"> ... </a>
A link used to pull up an outgoing message to a specific email addresses.
<a href="tel://###-###"> .. </a>
A link to make phone numbers clickable especially useful for mobile users.
<a name+"name"> ... </a>
An anchor thats useful for bringing users to specific document element.
<a href="#name"> ... </a>
An anchor link that brings users specifically to a div element.
No comments:
Post a Comment