The URL standard includes the port in it's definition...
Most browsers will allow you to forget the port and they will try the default one for the protocol specified.
When running a webserver on a non-standard port you simply have to include the it when you give people the url.
You can run any daemon/service on a non-standard port but the client needs to be capable of specifying it
ssh firstname.lastname@example.org -p 2222
hope this helps