It seems that when I enable the control port on port 9051, the IP would be 127.0.0.1:9051. When I visit the website, it says that it is a socks proxy, not an HTTP proxy.
You're enabling the control port on port 9051, and trying to connect in your browser to
127.0.0.1:9051? Tor's control port doesn't work like this. You need to communicate with the control port using Tor's control protocol. It's easiest to use software that is designed to communicate with tor's control port like nyx, or if you know Python then a library like stem.