Hello @noelned I think what you're asking is the command for printing in the serial monitor. I know it is serial.print() and for the last serial print you do serial.println() and put you're text or variable in the parantheses
Your topic has been moved to the Programming category
As to your question, personally I would use the sprintf() function to format the output string. This allows you to format a string and include the value of variables
Here is a simple example
char buffer[100]; //the output buffer
int data = 123; //some example data
sprintf(buffer, "The value of the data variable is %d", data); //build the output string
client.print(buffer); //output the string
Read up on how to do formatting with the C function printf() on which sprintf() is based
Basically the printf() function allows you to define the text to be put in the buffer and to include placeholders where the value of variables is to be inserted. In my simple example the %d in the sprintf() text will be replaced with the value of the data variable. As you will discover when you do some research the placeholder must match the type of data to be inserted
You also need to deal with some special characters. For instance, how do you get double quotation marks into the string when normally they would signal the end of the string ?
The easiest way to try things out is to print the output to the Serial monitor. Try this, for example
void setup()
{
Serial.begin(115200);
char buffer[100]; //the output buffer
int data = 123; //some example data
sprintf(buffer, "The value of the data variable is \"%d\"", data); //format the output with quotes round the data
Serial.print(buffer); //output the string
}
void loop()
{
}
Note how the quotation marks in the string have been escaped by using the backslash character.
Put whatever text you need to build up the HTML in the outer quotation marks of the second parameter of the sprintf() function
WARNING the size of the buffer needs to be large enough to hold all of the text that you put in it plus 1 character for the terminating '\0' that sprintf() will add so declare it accordingly
Note:
The number of single ticks in client.println("<textarea font-size: 40px'; placeholder= 'data' "); is uneven. I doubt that that is correct; I did however copy that over.
That sounds as though you have not written the HTML correctly
Please posts a complete example sketch that illustrates the problem. Have you tried printing the output instead of sending it to the client ? That would allow you to see exactly what is being sent
Thank you for trying to use code tags but you did it wrong
In the IDE, right click and select "Copy for forum" and the code tags will be added to what is copied. Post that here in a new reply. Without the code tags the forum software is interpreting some of the code as HTML tags making it difficult to make sense of your code
Where is the tag for the end of the textarea in post #14 ?
If you copied that code from the IDE the way Bob told you to, and pasted it into your message, it wouldn't look like that. Look around the forum, see what code looks like out there. Why is yours unformatted?