How to write HTML link code.
HTML text link
The code will create this link:
HTML link to same page
Anchor link code:
The code will create this link:
When pressing the link the browser will jump to the heading below, with this code:
Link code generator
HTML image link
The code will create this link:
[](link/html-image-link.htm)
HTML e-mail link
The code will create this link:
See: HTML mailto link.
HTML link to file download
The code will create this link:
See: HTML download link
HTML link open in new window
This link will open in new window or tab:
The code will create this link:
[Open page in new window](link/html-text-link.htm)
HTML button link
Without javascript:
<form action="link/html-button-link.htm">
<input type="submit" value="A button link">
With javascript:
Link color
Changing link color is done with css styling:
The code will generate this link:
Changing link background color is done with css styling:
The code will generate this link:
Relative vs. absolute path links
This is a link with relative path URL:
The code will generate this link:
This is a link with absolute path URL:
The code will generate this link:
HTML link code generator
Select link type:
Text link
Image link
Email link
Named anchor link
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:
