What are the differences between domain name hosting and web hosting and which one of them comes first?

A domain name hosting is to setup two active name servers on the Internet that store all the information about the domain name and reply for any query about it. While a web hosting is a service that comes after domain name hosting which hosts the web pages related to that domain name.