• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

modification of the font on HTML page esp 8266

Q&A Forum › Category: ESP8266 › modification of the font on HTML page esp 8266
0 Vote Up Vote Down
Soenen Marc asked 5 years ago

Hello
I created an application on ESP8266 for a level measurement of a well. An HTML page allows to see the water level, but the font is too small for a comfortable reading. how to enlarge the font of the display of variables. Thanks a lot for your help
 

2 Answers
0 Vote Up Vote Down
Soenen Marc answered 5 years ago

Here is the sketch


Start your code hereString getPage(){
String page = "<html lang=fr-FR><head><meta http-equiv='refresh' content='5'/>";
page += "<title>SONDE_NIVEAU_PUITS</title>";
page += "<style> body { background-color: #fffff; font-family: Arial, Helvetica, Sans-Serif; Color: #000088; }</style>";
page += "</head><body><h1>SONDE NIVEAU PUITS 17A </h1>";
page += "<ul><li><h2>distance entre l'eau et la sonde :</h2>";
page += Distance;
page += "<ul><li><h2>Hauteur d'eau :</h2>";
page += Niveau;
page += "<h2> MODIFICATION CONSIGNE</h2>";
page += "<form action='/' method='POST'>";
page += "<ul><li> (CONSIGNE: ";
page += Consigne;
page += ") ";
page += " <INPUT type='radio' name='Consigne' value='1'> MONTER";
page += "<h2></h2>";
page += "<h1><INPUT type='submit' value='Actualiser'></h1>";
page += "</body></html>";

return page;
0 Vote Up Vote Down
Steph answered 5 years ago

Hi Marc,

Instead, you should add this meta directive in the header of the HTML code :

<!doctype html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- then the instructions that were already in the header -->
</head>
<body>
    <!-- do not change the contents of the body -->
</body>
</hmtl>

Of course, if the layout also needs to be adapted to be responsive, you will have to work on the CSS style sheet.

I hope that’s what you wanted.

Regards,
Steph

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.