I think @neil-smithline is right, when I go to the What's my IP address page I don't get asked for my location, but there is a button which says "Location not accurate? Update your IP location" which then does ask for the browsers geolocation.
As for how your browser knows your location when you don't have a GPS in your laptop, from the article @neil-smithline linked to:
By default, Firefox uses Google Location Services to determine your location by sending:
- Your computer’s IP address,
- information about the nearby wireless access points, and
- a random client identifier, which is assigned by Google, that expires every 2 weeks.
The important part is the "information about the nearby wireless access points" bit. Google has a database of wireless networks that include the BSSID and the location. It is kept up to date in a number of ways, for example Google Street View cars recording WiFi, or people's phones with GPS enabled reporting back which WiFi networks are in the area, I believe Ingress reports that information back to Google as well (but I could be wrong).
Just using a list of near by wireless access points you can get a location to within a few meters. There is a public database called WiGLE that provides a similar service for example.