What happens when you click a link? So, when you click on a link, there are three things that can happen.
What happens when you click a link?
At a high level, when you click on a link, your browser and operating system figure out where you’ve clicked. The web page that you’re viewing has hidden information associated with whatever you clicked on. That’s called a(URL). That indicates the next web page that you want to view.
Embedded inside of the URL is the name of the web site that holds the page that you’ve asked for. Your browser takes that URL, breaks out the name of the web site, and then uses the(DNS) to get an (IP) address for the site.
Your browser then opens a(TCP) connection to the web site over IP. It asks to speak to the (HTTP) server (or, for secure connections, HTTPS) which then provides the next web page in HyperText Markup Language ( ) that your browser renders.
2. If css is involved
When CSS is involved in this scenario it will tell the browser to make changes to some elements. CSS is responsible for how your site looks and what element looks at what position.
So with the involvement of css, only sites view part can be changed like changing the size of element, color of text, hiding an element or showing any animation.
You click is an action for these languages. Your action is mapped to an action handler which contains the code or tell the browser what to do on click of this link.
It can open a new page, move some elements here and there, make a request to server for dynamic data or may be close the dialogue box.
End of Article.