We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 12
2ert2023 09.26 HTML Links Hyperinks
3
w Tutorials Exercisesw Servicesey§ QO Login
schools
HTML Links
[crv] Looe |
Links are found in nearly all web pages. Links allow users to click their way from
page to page.
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.
Note: A link does not have to be text. A link can be an image or any other HTML
element!
HTML Links - Syntax
The HTML tag defines a hyperlink. It has the following syntax:
link text
nitpsilmww:vdschools commit links. asp2ert2023 09.26 HTML Links Hyperinks
3
w Tutorialsy —Exercisesw Servicese§ QO Log in
schools
Clicking on the link text, will send the reader to the specified URL address.
Example
This example shows how to create a link to W3Schools.com:
Visit W3Schools.com!
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
Links can of course be styled with CSS, to get another look!
HTML Links - The target Attribute
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
nitpsilmww:vdschools commit links. asp ane2ert2023 09.26 HTML Links Hyperinks
3
w Tutorialsy —Exercisesw Servicese§ QO Log in
schools
https: //www.w3schools.com/" targe
_blank">Visit W3Schools!
Absolute URLs vs. Relative URLs
Both examples above are using an absolute URL (a full web address) in the href
attribute.
A local link (a link to a page within the same website) is specified with a relative URL
(without the "https://www" part)
Example