Write something in a html files at a specific lines

Hello ! So, I'd to host a web file with an arduino, and connected with a strain gauge. The arduino take the weigh for the strain gauge, and write the value in the html file ...But I want to write the values at a specific line... Can you help me plz ?

But I want to write the values at a specific line

So, what is the problem?

The easiest solution to to have two html files - one for the part before the dynamic data and one for the part after the dynamic data. When a client connects, return the before file contents, the dynamic data, and the after file contents.

if you wanted to be more generic to allow for future dynamic data, you could define your webpages with your own markers for your data using SGML with PI (essentially, HTML with replaceable elements, as used by PHP).

For example, your webpage definition (stored file) could be:

<html>
  <body>
    <span> My value is <?yolo $weight ?> </span>
  </body>
</html>

You would save this HTML in a file, and when requested, read each line and search for "<?" tags. Replace the tag content with the dynamic data and once built, send the resulting text out the HTML socket. This allows you to define your own mini-language ($weight in this case) and the HTML can be modified without having to change your code (unless you add access to new dynamic data).

The resulting html that would be sent would look like this:

<html>
  <body>
    <span> My value is 23 </span>
  </body>
</html>

where 23 is the dynamic value that was read for "weight".