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

By default, the linked page will be displayed in the current browser window. To change this, you must specify another target for the link.
The target attribute specifies where to open the linked document.

The target attribute can have one of the following values:
_self - Default. Opens the document in the same window/tab as it was clicked
_blank - Opens the document in a new window or tab
_parent - Opens the document in the parent frame
_top - Opens the document in the full body of the window


_blank

_blank

Absolute URLs vs. Relative URLs

Absolute URLs

a link to a page visit the others website. with the "https://www" part.
Example: ______________
Absolute URLs

Relative URLs

A local link (a link to a page within the same website) is specified with a relative URL (without the "https://www" part):
Example: ____________
Relative URLs


Image as a Link

Link to an Email Address

Use mailto: inside the href attribute to create a link that opens the user's email program (to let them send a new email):

_________ Email

Button as a Link

To use an HTML button as a link, you have to add some JavaScript code.


Link Titles attribute like tooltip

The title attribute specifies extra information about an element. The information is most often shown as a tooltip text when the mouse moves over the element.

___________

link, visited, hover, active

Here, an unvisited link will be green with no underline. A visited link will be pink with no underline. An active link will be yellow and underlined. In addition, when mousing over a link (a:hover) it will become red and underlined:

we can also these css on a Button.


Create Bookmarks

a2 a3 a4 a5

Back to