Ethernet Webserver and quote character?

Hi, I have a simple webserver working (Arduino Ethernet Shield Web Server Tutorial) and would like to change the background color of the web page.

The HTML Tag for that is
<bgcolor="rgb(123,123,123">

Of course the last lines below will not compile, so how do I send the above code?

    client.println("<!DOCTYPE html>");
    client.println("<html>");
    client.println("<head>");
    client.println("<title>Weather Data</title>");
    client.println("<body><bgcolor="rgb(123,123,123">"");
    client.println("<body><bgcolor="+char(34)+"rgb(123,123,123"+char(34)+">");

I can't think of the correct search term to find it myself. :slight_smile:

You can use ' inside your strings delimited by "

Or use the escape sequence: "

Be careful you are missing the closing ) at the end of rgb(123,123,123**)**

So as pYro_65 suggested client.println("<bgcolor=\"rgb(123,123,123)\">"; will do what you want.

Also given your strings are constant, if you find yourself short on SRAM memory and have plenty of space in Flash, see The F() macro

Serial.println(F("This string will be stored in flash memory"));

Awesome, thanks to you both.