Hi, I was build Asynchronous Web Server:
with Temperature and Humidity Readings on sample in your book. Ok so far.
But I want to add some other information on this web page. I tryed add another temparature reading and some door and window opening state, but the web page cannot display that correcty.
There is my part of code….(labels are in slovene language)
…
<body>
<h2>GARAZA</h2>
<p>
<i class=”fas fa-thermometer-half” style=”color:#059e8a;”></i>
<span class=”dht-labels”>Notranja temperatura</span>
<span id=”temperature”>%TEMPERATURE%</span>
<sup class=”units”>°C</sup>
</p>
<p>
<i class=”fas fa-tint” style=”color:#00add6;”></i>
<span class=”dht-labels”>Notranja vlaga</span>
<span id=”humidity”>%HUMIDITY%</span>
<sup class=”units”>%</sup>
</p>
<p>
<i class=”fas fa-thermometer-half” style=”color:#ebef0b;”></i>
<span class=”dht-labels”>Zunanja temperatura</span>
<span id=”tempext”>%TEMPEXT%</span>
<sup class=”units”>°C</sup>
</p>
</body>
<p>
<i class=”fas fa-door-open”></i>
<span class=”dht-labels”>VRATA GARAZE:</span>
<span id=”vrgstat”>%VRGSTAT%</span>
</p>
<p>
<i class=”fab fa-windows”></i>
<span class=”dht-labels”>OKNA GARAZE:</span>
<span id=”okgstat”>%OKGSTAT%</span>
</p>
<p>
<i class=”fas fa-door-open”></i>
<span class=”dht-labels”>VRATA HODNIK:</span>
<span id=”vrhstat”>%VRHSTAT%</span>
</p>
…
There is example, how its look on, may web page (I cant add a picture in this message) Text with bold character should be below your original measurement (temperature and humidity)
GARAZA
Notranja temperatura 33.30 °C
Notranja vlaga 35.20 TEMPEXTVRGSTATOKGSTATVRHSTAT%
Can you help me ?
Regards,
Bojan
Hi.
You’re just sharing the HTML text and that looks fine.
You need to provide more information, otherwise it’s very difficult to figure out what might be wrong.
When you say it doesn’t work, what happens exactly?
Can you share a picture on how it looks?
Regards,
Sara
Hi.
I received your email with the response.
In line 165, you have
<sup class="units">%</sup>
The % for the humidity can interfere with the % signs of the placeholders.
So, instead of the % sign, you should use the HTML entity: https://dev.w3.org/html5/html-author/charref
Regards,
Sara