Can I inset a URL or Webpage in my ARduino Code Header?


is it possible inset a URL or Webpage in my ARduino Code Header?

I like to insert or have the link of this website:

Click for weather forecast

to this part of my code: for h2 section:





I’ve tried everything but it does not compile!!!

any special function/code I should use?
Thank you

HTML code allows either " or ' to define strings. Since you're inside an Arduino string, you should use '.

Alternatively, you can use the C 'escape code' to use " inside a string. Find an online C reference to give you the answer.

to this part of my code

That isn't code. That is data that the code that you did NOT post outputs.

I've tried everything but it does not compile!!!

You need to post the complete arduino code that does not compile using code tag instructions from #7 below.,148850.0.html

You just need to ‘escape’ (with a backslash) the double-quote character inside your character strings. I put this in a sketch and it compiled and ran just fine:

    Serial.println(F("<!DOCTYPE HTML><html><head><title>J</title>"
      "<h2><span style=\"display: block !important; width: 320px; text-align: center; "
      "font-family: sans-serif; font-size: 12px;\">"
      "<a href=\""
      "?query=zmw:94101.1.99999&bannertypeclick=wu_clean2day\" "
      "title=\"San Francisco, California Weather Forecast\" target=\"_blank\">"
      "<img src=\""
      "ForcedCity=San Francisco&ForcedState=CA&zip=94101&language=EN\" "
      "alt=\"Find more about Weather in San Francisco, CA\" width=\"300\" /></a>"
<a href=\""
      "?query=zmw:94101.1.99999&bannertypeclick=wu_clean2day\" "
      "title=\"Get latest Weather Forecast updates\" style=\"font-family: sans-serif; font-size: 12px\" "
      "target=\"_blank\">Click for weather forecast</a></span></h2>"
      "<form action='/control' method='POST'>"));