-->
Page 1 of 2

How do I change the font size?

PostPosted: Sat Feb 25, 2017 7:21 pm
by iipreca
Programming with Arduino IDE version 1.8.1
I have some code that I am trying to increase the font size on but none of the html tags related to font size are working for me. I was able to use the heading tag to change the font that way but all I want to do is increase the size. I have the <font size: x-large> in and it compiles but it does not show any change on the web page after refreshing. What am I doing wrong?



client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println(""); // do not forget this one
client.println("<!DOCTYPE HTML>");
client.println("<html>");
client.println("<br><br>");
client.println("<font size: x-large><a href=\"/Open=HIGH\">OPEN</a> the North garage door 500mS pulse.<br>");
client.println("<br><br>");
client.println("<style='font-size: x-large;'><a href=\"/Close=HIGH\">CLOSE</a> the North garage door 500mS pulse.<br>");
client.println("<br><br>");
client.println("<a href=\"/Stop=HIGH\">STOP</a> the North garage door 2 second pulse to drop out contactor.<br>");
client.println("<br><br>");
client.println(" Turn the <a href=\"/Light=HIGH\"> LIGHT</a> on. Light stays on for 15 minutes.<br>");
client.println("<br><br>");
client.println("Click <a href=\"/LED=ON\">here</a> turn the LED on pin 2 ON (on board LED test light).<br>");
client.println("</html>");

Re: How do I change the font size?

PostPosted: Sat Feb 25, 2017 10:24 pm
by rudy
One way.

Code: Select all<div style="font-size:24px;">
<br><br>
<a href="/Open=HIGH">OPEN</a> the North garage door 500mS pulse.<br>
<br><br>
<a href="/Close=HIGH">CLOSE</a> the North garage door 500mS pulse.<br>
<br><br>
<a href="/Stop=HIGH">STOP</a> the North garage door 2 second pulse to drop out contactor.<br>
<br><br>
Turn the <a href="/Light=HIGH"> LIGHT</a> on. Light stays on for 15 minutes.<br>
<br><br>
Click <a href="/LED=ON">here</a> turn the LED on pin 2 ON (on board LED test light).<br>
</div>

Re: How do I change the font size?

PostPosted: Sat Feb 25, 2017 10:47 pm
by iipreca
when I use

<div style="font-size:24px;">

I get a " expected ')' before 'font' " error. I had tried this previously and got the same error as well.

why is this?

Re: How do I change the font size?

PostPosted: Sat Feb 25, 2017 11:39 pm
by RichardS
You probably have quotes inside quotes....

"<div style="font-size:24px;"" sort of thing....

use "<div style=\"font-size:24px;\"" or "<div style='font-size:24px;'"

RichardS