Geo-location on the Web for Desktop Browsers (Not Apps on phones)

My Desktop web app (*Note NOT Mobile phone app) needs to store a user’s geo-location.

I am happy for the user to input manual suburb, city, country location.

I have not yet looked into how geo-location works, but my guess is, if you are on a phone, simply switch on GPS , and program against the phone’s sdk to extract the phone’s Latitude/Longitude pairs.

Question A)
Is my above understanding of GEO on the phone a correct representation?

Question B)
How is capturing Lat/Long co-ordinates work with Desktop Browser apps, given there is no GPS hardware on standard laptops / computers?

Question C)
If I have to resort to manual country / state / suburb input by user, are there any (preferably free) valid lists of such, which also provide lat/long co-ords ?

I have no problem creating a REST API myself to do this, but first I need the data. For major (english-speaking) countries like the USA, UK, Australia, Canada, etc does anyone know of any data sources (or even already available API’s ? ).

Does Google Maps / Bing Maps have anything that can be used in this regard ?

There is a challenge in freeCodeCamp from which you can start your research: JSON APIs and Ajax: Get Geolocation Data to Find A User’s GPS Coordinates

Ok magical, thank you. I tried the FCC link you gave me and it kind of worked, I can get the Lat/Long co-ords to within about 1 km (which is acceptable).

But now I am really wondering how the Desktop Browser is able to do this !
(is Google spying on us, or is the ISP-assigned IP address have something to do with it, or what ? )