When going to a website we see https://example.com, I know the purpose of http and https protocols, but what is the purpose of "://" after? I know "\" is being used for directories, but still dont explain the ":"
':' separates the protocol and the resource.
The basic idea is that a path starting with '/' indicates the root of a device/volume etc. So, '//' is used to indicate the "top of the network", followed by the server name.
In a URL, this scheme can be used to indicate relative paths on the same resource, e.g. http:/index.html for a file in the root of the current server, or http:pic.gif for a file in the same directory on the current server.
Microsoft Windows generally uses backslashes ('\' and '\\') instead of the forward slashes because PC DOS 1.0 already used '/' as a commandline option indicator before subdirectories were introduced in PC DOS 2.0.
Check out the explanation on this Wikipedia page.
https://en.wikipedia.org/wiki/URL [Under 'Syntax']