When I was in your position, I bought a lot of 3 old ThinkPad T40s with the intention of selling two of them. It didn’t work very well, but I was able to use the nicest one with Ubuntu as my daily driver for a few years until I made enough money with web development to get a MacBook.
So long as it runs Linux, you can learn web dev on it.