HTML Link Code
Maybe your like
How to write HTML link code.
- Text link
- Link to same page
- Image link
- E-mail link
- Link to file download
- Link open in new window
- Button link
- Link color
- Relative vs. absolute path links
- Link code generator
HTML text link
<a href="link/html-text-link.htm">Text Link</a>
The code will create this link:
Text Link
HTML link to same page
Anchor link code:
<a href="#generator">Link code generator</a>
The code will create this link:
Link code generator
When pressing the link the browser will jump to the heading below, with this code:
<h2><a id="generator">Link code generator</a></h2>
HTML image link
<a href="link/link-image.htm"><img src="link/flower.jpg" width="82" height="86" alt="Flower"></a>
The code will create this link:

HTML e-mail link
<a href="mailto:[email protected]">Send Mail</a>
The code will create this link:
Send Mail
See: HTML mailto link.
HTML link to file download
<a href="link/test_file.zip">Download File</a>
The code will create this link:
Download File
See: HTML download link
HTML link open in new window
This link will open in new window or tab:
<a href="link/html-text-link.htm" target="_blank">Open page in new window</a>
The code will create this link:
Open page in new window
HTML button link
Without javascript:
<form action="link/html-button-link.htm"> <input type="submit" value="A button link"> </form>
With javascript:
<input type="button" value="A button link" onclick="window.location.href='link/html-button-link.htm'">
Link color
Changing link color is done with css styling:
<a href="link/html-link-color.htm" style="color:red">Link color page</a>
The code will generate this link:
Link color page
Changing link background color is done with css styling:
<a href="link/html-link-color.htm" style="background-color:#ffffa0">Link color page</a>
The code will generate this link:
Link color page
Relative vs. absolute path links
This is a link with relative path URL:
<a href="link/html-text-link.htm">Text Link</a>
The code will generate this link:
Text Link
This is a link with absolute path URL:
<a href="https://www.rapidtables.com/web/html/link/html-text-link.htm">Text Link</a>
The code will generate this link:
Text Link
HTML link code generator
| Enter link text: | |
| Enter URL to link to: | |
| Set CSS link style: | |
| Normal link: | |
| color: | - hex code - Aqua Black Blue Fuchsia Gray Green Lime Magenta Maroon Navy Olive Purple Red Silver Teal White Yellow |
| background-color: | - hex code - Aqua Black Blue Fuchsia Gray Green Lime Magenta Maroon Navy Olive Purple Red Silver Teal White Yellow |
| text-decoration: | underline none |
| target-new: | none tab window |
| Hovered link: | |
| color: | - hex code - Aqua Black Blue Fuchsia Gray Green Lime Magenta Maroon Navy Olive Purple Red Silver Teal White Yellow |
| background-color: | - hex code - Aqua Black Blue Fuchsia Gray Green Lime Magenta Maroon Navy Olive Purple Red Silver Teal White Yellow |
| text-decoration: | underline none |
| target-new: | none tab window |
| Generated link view: | |
| Generated link code: |
See also
- HTML comments
- HTML anchor link
- HTML button link
- HTML download link
- HTML image link
- HTML link color
- HTML mailto link
- HTML new window link
- HTML text link
Tag » A Link Html Code
-
HTML Links Hyperlinks - W3Schools
-
HTML A Tag - W3Schools
-
HTML Hyperlink Codes.
-
How To Insert Hyperlink In HTML Page? - Tutorialspoint
-
How To Create Links To Other Pages In HTML - Tutorial Republic
-
Creating Hyperlinks - Learn Web Development - MDN - Mozilla
-
Linking To Other Pages On Your Website - Home And Learn
-
Links
-
HTML Link – How To Insert A Link To A Website With HREF Code
-
How To Create An HTML Link On A Web Page - Computer Hope
-
HTML Button Link Code Examples – How To Make HTML Hyperlinks ...
-
How To Add Links In HTML Code | HTML5 Linking Tutorial - YouTube
-
HTML Link Code — How To Insert A Link To A Website With HREF
-
How To Make A Link - HTML Tutorial - EchoEcho.Com