Web Server - How do I hyperlink an Arduino variable?

Hi,

I have the following three lines of code in my sketch that sends data to/from my browser. The code works as is but I want to change it a bit.

Right now the first line prints out the variable temperatureF and second line adds the word degrees. Then the third line is a hyperlink with the label "Update Temperature" which I use to update the temperature reading.

Example current output:

86.7 degrees
Update Temperature <hyperlinked

What I'd like to do is eliminate the Update Temperature line and hyperlink the "temperatureF degrees" line.

What I'm trying to get:

86.7 degrees <hyperlinked

I'm able to hyperlink the word degree but I can't find a syntax that will also let me hyperlink the variable temperatureF. This is what I'm struggling with.

   client.print(temperatureF);//Temperature
            client.println(" degrees
");//Units

            client.println("<a href=\"/?R8\"\">Update Temperature</a>");

I hope this makes sense.

Thanks,
BrianB

client.println("<a href="/?R8"">Update Temperature");
The red text is the part that is going to be underlined.

This is the part you want underlined:

client.print(temperatureF);//Temperature
            client.println(" degrees
");//Units

so:

     client.print("<a href=\"/?R8\"\">");
     client.print(temperatureF);//Temperature
     client.print(" degrees
");//Units
     client.println("</a>");

PaulS,

I learned a couple things thanks to you.

I should have pulled out the HTML code and looked at it all by itself. If I would have done that in my test sketch it would have been obvious that I was closing the hyperlink <\a> in the wrong place.

Once I knew the HTML was correct, I could have focused on the proper syntax needed to send it from the sketch.

As it was I got so focused on the client.print syntax that I missed "The Elephant in the Room".

Thanks again,
BrianB