You really should use a third party library for this and I'd like to add that SFML is another valid option.
But, in the interest of academia, you would fill in a 'addrinfo' struct using the "getaddrinfo()" function. The first argument will be the address of the site that you are trying to connect to and the second argument should be "http" to indicate the service. Then use that 'addrinfo' sturct to create a SOCKET with the function "socket()" and finally call "connect()" to establish a connection. If the return value from "connect()" is not 'SOCKET_ERROR' then you have a valid connection.