Led when connection fails

Im very new too all this but im trying to use the arduino uno and Ethernet shield 2 to connect to a web page and if the connection fails it trigger a led. Not sure how to go about this.

You need a sketch for an Ethernet client. Perhaps you can try the client.connect() as in this example : https://www.arduino.cc/en/Reference/EthernetClient I'm not sure if the client.connect() is enough, perhaps you also have to try to read a few bytes from that page with 'GET'.