DEV Community

Joel Diharce
Joel Diharce

Posted on

Hyperrrrr-linx (sp?) ;D

Google docs and sheets just automatically makes hyperlinks when you enter a URL. Well, apparently html creates hyperlinks with an anchor tag (<a>) and an href attribute, which is required.

Remember how images use the relative or the absolute URLs? Well, heheh... yup, hyperlinks can use either too. If the hyperlink uses to a webpage on our own website, then we would use the relative URL. If it leads to a different website (not within the server file containing our website, which is most likely the case if it's a different website), we would use the absolute URL. To remind you, relative URLs are made up of the file path that leads to the webpage file within the enclosing website's server file. Relative URLs usually start with the file name, and Absolute URLs typically start with https://www.[__].com

Example Time!
Here is the code as written:
<a href="https://www.boredpanda.com/cat-virus-exe-funny-pics/?utm_source=google&utm_medium=organic&utm_campaign=organic">When kittehs strike!</a>
Enter fullscreen mode Exit fullscreen mode
And, here is the code as I intend the user to view it:

When kittehs strike!

Disclaimer: no code was harmed in the making of this blog post. Also, markdown apparently creates a hyperlink just from entering the URL, hence the "codified" URL above, near the top.

Top comments (0)