Viruses

I was just about to clear away a tab that had porn on it and it said there were viruses on my phone (on the tab) and gave a link to click onto get rid of the viruses I didn’t click on the link just cleared the tab away does my phone have a virus