A question I’m often asked, is “How do I link to other content on the web from my own website?”
While web developers do this in their sleep, it’s not so obvious and easy for those that don’t do it all the time. Here is a breakdown of the HTML command to create a hyperlink to other content. (Note: Your keystrokes are in bold)
We start out with the opening anchor tag: <a
Next comes the href attribute: href (This stands for hypertext reference), followed by the = sign to tell it what to reference.
After that comes the URL that we are going to reference, surrounded by quotes:
(Be sure to put in the opening and closing quotes. They must be there for the correct syntax to work.)
We then need to close the attribute with the closing tag: >
So the full command is: <a href=”https://yellowfrogmedia.com” >
However, if you leave it at this point, you will have a hyperlink, but nobody will see it because we need one more argument at the end of the command so it will “magically” appear. The next item is the actual text you want to show to the user that prompts them to click the link we just created.
So we follow the command with some text that is meaningful such as: Click This Link
And we close it with a closing anchor tag: </a>
Now we have: <a href=”https://yellowfrogmedia.com” >Click This Link</a> and it looks like this:
Click This Link
Cool huh! When you click it, it opens a tab and takes you to the home page of this website.
Now for some fun! You can try it with this simple HTML editor found here. (That’s right, I just created this hyperlink to show you how to get to the free online editor to let you try it yourself.)
Dave is a developer for Yellow Frog Media where he works on websites for small to medium sized businesses. In the past he has served as a blogger, teacher, software developer and project manager. He resides in Arlington, Texas with his wife Charlotte and their four-legged child. (A Jack Russell Terrier mix named Eddie).