The web is just an application, like email. It was invented at CERN in Switzerland by Tim Berners-Lee in the mid 1990s ( yet another government sponsored bit of software, given away for FREE ).
Elon built his fortune on using the creation of other people, most of whom worked for national governments. Scientists and inventors, not working to make someone else rich, but working to help citizens. Elons first real money maker was Paypal.
from the wikipedia...
The Advanced Research Projects Agency Network (ARPANET) was the first wide-area packet-switched network with distributed control and one of the first computer networks to implement the TCP/IP protocol suite. Both technologies became the technical foundation of the Internet. The ARPANET was established by the Advanced Research Projects Agency (now DARPA) of the United States Department of Defense.[1]
Building on the ideas of J. C. R. Licklider, Bob Taylor initiated the ARPANET project in 1966 to enable resource sharing between remote computers.[2] Taylor appointed Larry Roberts as program manager. Roberts made the key decisions about the request for proposal to build the network.[3] He incorporated Donald Davies' concepts and designs for packet switching,[4][5] and sought input from Paul Baran on dynamic routing.[6] In 1969, ARPA awarded the contract to build the Interface Message Processors (IMPs) for the network to Bolt Beranek & Newman (BBN).[7][8] The design was led by Bob Kahn who developed the first protocol for the network. Roberts engaged Leonard Kleinrock at UCLA to develop mathematical methods for analyzing the packet network technology.[6]
I should know, I wrote ( as one of the wonderkids of that era ) code for the IMPs when I was a young person in college. It was written in machine language because the IMPs were essentially very low performance mini/micro computers that processed the packets from the network and turned them into messages for the "mainframes" of that era.
BTW, please NOTE that the Arpanet and therefore the Internet was created not by private industry, but with your tax dollars at a federal government agency. Please repeat that often to those that say the federal government doesn't ever do anything for people...