When we want some users to click a link from text inside some posts, we need to use html tag “a href” . In this post, we will show a simple example of HTML Text links, on click of which you can directly visit the website from the link.
<!DOCTYPE html> <html> <body> <p> <a href="http://www.greenecosystem.in" target="_blank">Visit Green Ecosystem Website</a> </p> </body> </html>
Above code, when seen in webpage can look as,
Once you click on this link, you will see a new browser tab opened, and a website link will be opened in new tab. This is because, we have added ‘ target=”_blank” ‘ along with the “a href” html tag.
If you need open the website in same tab, as your text, just remove ‘ target=”_blank” ‘ from “a href”