The page opens but the buttons do nothing
- ESP32
- ESP8266
- HTML for Gadgets
You may see
Why it happens
- The link in the HTML and the address in the sketch differ, even by one letter or slash.
- The right order reaches the board, but the LED is on another pin.
How to fix it
- Compare
href="/led/on"withserver.on("/led/on", …)letter by letter. - Add
Serial.println("led on");inside the handler. - If it prints but the LED stays dark, check the pin, the resistor and the LED's legs.
It worked if: Each button prints its own line in the Serial Monitor.
Tutorials where it can happen
- Buttons That Do Things: Links as Switches
- Put Your Web Page on a Real ESP32
- ESP32 Async Web Server Code
- ESP32 DHT11 Web Server: Show Temperature and Humidity
- ESP32 Web Server: Control LED Brightness with a Slider
- ESP8266 NodeMCU Relay: Control AC Appliances
11 more
- How to make an ESP32 Web Server?
- How to make an ESP8266 Web Server?
- How to use the BLE on the ESP32?
- How Your Gadget Talks to Your Phone
- Make It Fit the Phone: head, title and viewport
- Make Your Control Panel Look Good with CSS
- Project: My Smart Room Control Panel
- Show Sensor Readings in a Table
- Sliders: a Dimmer for Your LED
- What is a Web Socket Server?
- Your First Page: the Skeleton of Every Gadget Page
From how the part works. How web requests work.
Didn't help? Search another error or ask us.

